:root {
  --black: #050505;
  --gray: #8a8a8a;
  --line: #e6e6e6;
  --bg: #f8f8f6;

  --sans: "Helvetica Now Display", Helvetica, Arial, sans-serif;
  --serif: "EB Garamond", Garamond, Georgia, serif;

  --content-width: 705px;
}

::selection {
    background: #111;
    color: #f8f8f6;
}

img {
  -webkit-user-select: none; /* Safari and Chrome */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ and Edge */
  user-select: none;         /* Standard syntax */
}

html {
  background: var(--bg);
  color: var(--black);
  font-family: var(--sans);
  font-size: 10px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--black);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

.js-fade-page,
.js-fade-section {
  will-change: opacity, transform;
}

.preloader {
    position: fixed;
    inset: 0;
    background: #F8F8F6;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity .8s ease, visibility .8s ease;
}

.preloader span {
    font-size: 14px;
    font-family: var(--sans);
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.page {
  width: 100%;
  min-height: 100vh;
}

.grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  column-gap: 10px;
  padding-left: 10px;
  padding-right: 10px;
}

/* Hover line */

.link-hover {
    display: inline-block;
    white-space: nowrap;
}

.link-hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-hover:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Header */

.header {
  padding-top: 10px;
}

.header__name {
  grid-column: 1 / span 3;
}

.header__location {
  grid-column: 8 / span 3;
}

.header__cv {
  grid-column: 15 / 17;
  justify-self: end;
  white-space: nowrap;
}

.work-link,
.footer__links a {
  width: fit-content;
  max-width: max-content;
}

.link-hover {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: max-content;
  white-space: nowrap;
}

.link-hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-hover:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero */

.hero {
  padding-top: 220px;
}

.hero__media {
  grid-column: 1 / span 3;
  padding-top: 210px;
}

.hero__media img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
}

.hero__content {
  grid-column: 8 / span 8;
  width: 100%;
  max-width: var(--content-width);
  font-family: var(--serif);
  font-size: 40px;
  line-height: 38px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.hero__content h1 {
  font: inherit;
  letter-spacing: inherit;
}

.hero__content p {
  font: inherit;
  letter-spacing: inherit;
}

.hero__content h1 + p {
  margin-top: 32px;
}

/* Sections */

.section {
  padding-top: 70px;
}

.section__content {
  grid-column: 8 / span 8;
  width: 100%;
  max-width: var(--content-width);
}

.section__label {
  margin-bottom: 64px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--gray);
}

/* Lists */

.list {
  border-top: 1px solid var(--line);
}

.list__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 15px 0 14px;
  border-bottom: 1px solid var(--line);
}

.list__row h3,
.list__row span,
.work-link,
.text-block p {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 30px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.list__row p {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--gray);
}

.list__row span,
.work-link {
  white-space: nowrap;
  justify-self: end;
}

.is-disabled {
  color: var(--gray);
}

/* Text Blocks */

.text-block {
  padding: 15px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Footer */

.footer {
  padding-top: 230px;
  padding-bottom: 10px;
}

.footer p {
  grid-column: 1 / span 4;
}

.footer__links {
  grid-column: 8 / span 8;
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.footer-link {
  display: inline-block;
}

/* Responsive */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .header {
    row-gap: 8px;
  }

  .header__name {
    grid-column: 1 / span 3;
  }

  .header__location {
    grid-column: 4 / span 3;
  }

  .header__cv {
    grid-column: 8 / span 1;
  }

  .hero {
    padding-top: 120px;
  }

  .hero__media {
    grid-column: 1 / span 3;
    padding-top: 56px;
  }

  .hero__content {
    grid-column: 1 / -1;
    max-width: var(--content-width);
  }

  .section__content {
    grid-column: 1 / -1;
    max-width: var(--content-width);
  }

  .section__label {
    margin-bottom: 48px;
  }

  .footer {
    row-gap: 24px;
  }

  .footer p {
    grid-column: 1 / -1;
  }

  .footer__links {
    grid-column: 1 / -1;
    max-width: var(--content-width);
  }
}

@media (max-width: 540px) {

    .grid {
        grid-template-columns: repeat(4, 1fr);
        column-gap: 10px;
        padding-inline: 10px;
    }

    /* ---------------- Header ---------------- */

    .header {
        padding-top: 10px;
    }

    .header__name {
        grid-column: 1 / span 2;
    }

    .header__location {
        display: none;
    }

    .header__cv {
        grid-column: 3 / span 2;
        justify-self: end;
    }

    /* ---------------- Hero ---------------- */

    .hero {
        padding-top: 72px;
    }

    .hero__media {
        display: block;
        grid-column: 1 / -1;

        padding-top: 0;
        padding-bottom: 40px;
    }

    .hero__media img {
        width: 170px;
        max-width: 100%;
        height: auto;
    }

    .hero__content {
        grid-column: 1 / -1;
        max-width: none;

        font-size: 26px;
        line-height: 26px;
        letter-spacing: -0.03em;
    }

    .hero__content p + p {
        margin-top: 26px;
    }

    /* ---------------- Sections ---------------- */

    .section {
        padding-top: 60px;
    }

    .section__content {
        grid-column: 1 / -1;
        max-width: none;
    }

    .section__label {
        margin-bottom: 32px;

        font-size: 14px;
        line-height: 14px;
        letter-spacing: 0;
    }

    /* ---------------- Lists ---------------- */

    .list__row {
        grid-template-columns: 1fr auto;
        gap: 12px;

        padding: 14px 0;
    }

    .list__row h3,
    .list__row span,
    .work-link,
    .text-block p {

        font-size: 20px;
        line-height: 24px;
        letter-spacing: -0.03em;
    }

    .list__row p {
        margin-top: 4px;

        font-size: 14px;
        line-height: 14px;
        letter-spacing: 0;
    }

    .text-block {
        padding: 14px 0;
    }

    /* ---------------- Footer ---------------- */

    .footer {
        padding-top: 120px;
        padding-bottom: 10px;

        row-gap: 28px;
    }

    .footer p {
        grid-column: 1 / -1;
    }

    .footer__links {
        grid-column: 1 / -1;

        display: flex;
        flex-wrap: wrap;
        gap: 4px;

        line-height: 18px;
    }
}