:root {
  --font-text: "Geist Mono", system-ui, sans-serif;
  --font-title: var(--font-text);
  --color-background: #f6f5f3;
  --color-title: #0c1115;
  --color-link: currentColor;
  --color-text: color-mix(in oklch, var(--color-title) 75%, var(--color-background));
  --color-shadow: color-mix(in oklch, var(--color-title) 10%, var(--color-background));

  --font-bold: 700;
  --font-size-0: .85rem;
  --font-size-1: 1rem;
  --font-size-2: 1.3rem;
  --font-size-3: 2rem;

  @media (prefers-color-scheme: dark) {
    --color-background: #0c1115;
    --color-title: #c2dbe7;
  }
}


* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  interpolate-size: allow-keywords;
  font-family: var(--font-text);
  font-size: 100%;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
}

body {
  padding: 4rem 2rem;
  max-width: 80ch;
  margin: 0 auto;
  font-size: var(--font-size-1);
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: var(--font-bold);
}

strong {
  font-weight: var(--font-bold);
}

ul {
  list-style-type: disc;
  padding-left: 1.5em;
}

p, ul {
  margin-block: .5lh;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;

  &:hover {
    text-decoration: none;
  }
}
svg {
  display: block;
  stroke: currentColor;
}

@scope (.cv-header) {
  h1 {
    margin: 0 0 .25em;
    font-size: var(--font-size-3);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-title);
  }

  p {
    margin: 0;
    font-size: var(--font-size-2);
    letter-spacing: -0.01em;
    color: var(--color-title);
    text-wrap: balance;
    line-height: 1.4;
  }

  img {
    max-width: min(50%, 120px);
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    float: right;
    margin: 0 0 0 1em;
  }

  @media (width < 500px) {
    img {
      float: none;
      margin: 0 auto 1em;
    }
  }
}

@scope (.cv-location) {
  :scope {
    display: flex;
    gap: 2ch;
    margin-top: 2em;
  }

  p {
    margin: 0;
  }
}

@scope (.cv-contact) {
  :scope {
    display: flex;
    gap: 2ch;
    font-style: normal;
    margin-top: 1em;
  }

  p {
    margin: 0;
    display: flex;
    column-gap: 2ch;
    row-gap: 0.25lh;
    flex-wrap: wrap;
  }

  a {
    font-weight: var(--font-bold);
  }
}

@scope (.cv-blocks) {
  :scope {
    display: grid;
    row-gap: 4em;
    margin-top: 4em;
  }

  h2 {
    font-size: var(--font-size-2);
    letter-spacing: -0.01em;
    margin-block: 0 1em;
    border-bottom: solid 1px var(--color-shadow);
    color: var(--color-title);
  }

  h3 {
    font-size: var(--font-size-1);
    color: var(--color-title);
    margin: 0;
  }
}

@scope (.cv-tags) {
  :scope {
    list-style-type: "";
    margin: 1em 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .25em;
    font-size: var(--font-size-0);
  }
  li {
    padding: .1em .5em;
    color: var(--color-title);
    background-color: var(--color-shadow);
    border-radius: 6px;
  }
}

@scope (.block-tech) {
  ul {
    list-style-type: "";
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .25em;
  }
  li {
    padding: .25em .5em;
    background-color: var(--color-text);
    color: var(--color-background);
    border-radius: 6px;
    display: flex;
    gap: 1ch;
  }
  svg {
    width: 24px;
    height: 24px;
  }
}

@scope (.block-education) {
  ul {
    margin: 2em 0 0;
    padding: 0 0 0 1em;
    display: grid;
    row-gap: 2em;
  }
  h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 1ch;
    justify-content: space-between;

    span {
      font-weight: normal;
      color: var(--color-text);
      font-size: var(--font-size-0);
    }
  }

  p {
    margin: 0;

    + p {
      margin-top: 1lh
    }
  }
}

@scope (.block-work) {
  :scope > ul {
    margin: 2em 0 0;
    padding: 0 0 0 1em;
    display: grid;
    row-gap: 2em;
  }

  h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 1ch;
    justify-content: space-between;

    span {
      font-weight: normal;
      font-size: var(--font-size-0);
    }
  }

  header p {
    margin: 0;
    font-family: var(--font-title);
    color: var(--color-title);
  }
}

@scope (.block-projects) {
  :scope > ul {
    list-style-type: "";
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));

    > li {
      border: solid 1px var(--color-shadow);
      border-radius: 6px;
      padding: 1em;
      display: grid;
      grid-template-rows: auto 1fr;

      > div {
        font-size: var(--font-size-0);
      }
    }
  }
}
/* cyrillic-ext */
@font-face {
  font-family: "Geist Mono";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-italic-100-900-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-display: swap;
}

/* cyrillic */
@font-face {
  font-family: "Geist Mono";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-italic-100-900-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}

/* symbols2 */
@font-face {
  font-family: "Geist Mono";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-italic-100-900-symbols2.woff2") format("woff2");
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
  font-display: swap;
}

/* vietnamese */
@font-face {
  font-family: "Geist Mono";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-italic-100-900-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
  font-display: swap;
}

/* latin-ext */
@font-face {
  font-family: "Geist Mono";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-italic-100-900-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

/* latin */
@font-face {
  font-family: "Geist Mono";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-italic-100-900-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;
  font-display: swap;
}

/* cyrillic-ext */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-normal-100-900-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-display: swap;
}

/* cyrillic */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-normal-100-900-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}

/* symbols2 */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-normal-100-900-symbols2.woff2") format("woff2");
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
  font-display: swap;
}

/* vietnamese */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-normal-100-900-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
  font-display: swap;
}

/* latin-ext */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-normal-100-900-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

/* latin */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-mono-normal-100-900-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;
  font-display: swap;
}
