@font-face {
    font-family: 'Cascadia Mono';
    src: url(cb109f1d1b6310c246af.woff2) format('woff2'),
        url(e599fcf2ff63e46b99ad.woff) format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url(a0acf4b333531ac93e94.woff2) format('woff2'),
        url(126516567b3e97d093a0.woff) format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

html, * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  --font-headings: 'Cascadia Mono', 'Courier New', Courier, monospace;
  --font-regular: 'Nunito', Arial, Helvetica, sans-serif;
  --background: #e3dfd8;
  --darker-background: #acb8d1;
  --primary-accent: #d09412;
  --secondary-accent: #9a2d4d;
  --footer-background: #113681;
  --dark-text-color: #070505;
  --light-text-color: #ede5db;
  --shadow-background-color: 39deg 8% 54%;
  --shadow-preset:
    0.3px 0.7px 0.9px hsl(var(--shadow-background-color) / 0.29),
    0.8px 1.7px 2.1px -0.6px hsl(var(--shadow-background-color) / 0.29),
    1.5px 3.4px 4.2px -1.2px hsl(var(--shadow-background-color) / 0.29),
    3.1px 6.9px 8.5px -1.9px hsl(var(--shadow-background-color) / 0.29),
    6px 13.3px 16.4px -2.5px hsl(var(--shadow-background-color) / 0.29);
  --css-color: #283b5e;
  --html-color: #c21238;
  --js-color: #eaa418;
  --scss-color: #f093b4;
  --swift-color: #cb4f00;
  --python-color: #22547e;
}


body {
  display: block;
  margin: 0;
  padding: 0;
  font-family: var(--font-regular);
  font-size: 18px;
  background: var(--background);
  color: var(--dark-text-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  width: 100%;
  text-align: center;
}

svg {
  color: inherit;
  width: 1.5rem;
  height: auto;
}

a:has(svg):active {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

section {
  margin-inline: max(var(--hero-image-offset), calc((100vw - 1200px) / 2));
  padding: 1.5rem;
}

footer {
  padding-inline: max(1.5rem, calc((100vw - 1200px) / 2));
}

section.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  
  .image-container {
    max-width: min(400px, 100%);
    display: flex;
    justify-content: center;
    position: relative;

    picture {
      display: inherit;
      justify-content: inherit;
    }

    p {
      font-family: var(--font-headings);
      font-size: 3rem;
      
      bottom: 0;
      left: 0;
      position: absolute;
      color: var(--light-text-color);
      text-align: left;
      width: 1px;
    }

    img {
      width: 100%;
    }
  }

  .about-container {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
  }
}

section.my-work {
  display: grid;
  justify-content: center;
  gap: 1rem;
  width: 100%;

  .projects-container {
    display: grid;
    width: 100%;
    gap: 2rem;
    grid-template-columns: minmax(200px, 350px);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-preset);
  min-height: 300px;
  align-items: start;
  
  .image-container {
    position: relative;
    max-height: 200px;
    width: 100%;
    
    img {
      width: 100%;
      object-fit: cover;
      height: 100%;
      filter: brightness(0.25) saturate(0.75);
    }
    h3 {
      color: var(--light-text-color);
      position: absolute;
      top: 50%;
      left: 0;
      transform: translateY(-50%);
      width: 100%;
      text-align: center;
    }
  }

  .info-container {
    display: grid;
    gap: 1rem;
    .top-line {
      padding: 0 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;

      .tags-container {
        display: flex;
        gap: 0.5rem;

        .tag {
          padding: .25rem .5rem;
          border-radius: 16px;
          font-size: 0.75rem;
          display: grid;
          place-items: center;
          font-family: Arial, Helvetica, sans-serif;
          font-weight: 700;
        }
      }

      .external-links {
        display: flex;
        gap: 1rem;
        a {
          color: inherit;
          text-decoration: none;
          display: grid;
          place-items: center;
          svg {
            color: inherit;
            width: 1.5rem;
            height: auto;
          }
        }
      }
    }

    .bottom-line {
      padding: 0 1rem 4rem 1rem;
    }
  }
}

footer {
  background-color: var(--footer-background);
  color: var(--light-text-color);
  padding-bottom: 0;
  display: grid;
  gap: 1.5rem;

  .info-container {
    padding: 1.5rem 1.5rem 0 1.5rem;
    display: grid;
    gap: 1.5rem
  }

  .image-container {
    max-width: 100%;

    picture {
      display: inherit;
      justify-content: inherit;
      
      img {
        width: 100%;
      }
    }
  }

  .call-to-action {
    font-style: italic;
  }

  .email {
    text-decoration: underline;
  }
}

.tag.javascript {
  background-color: var(--js-color);
  color: var(--dark-text-color);
}
.tag.html {
  background-color: var(--html-color);
  color: var(--light-text-color);
}
.tag.css {
  background-color: var(--css-color);
  color: var(--light-text-color);
}
.tag.scss {
  background-color: var(--scss-color);
  color: var(--dark-text-color);
}
.tag.swift {
  background-color: var(--swift-color);
  color: var(--light-text-color);
}
.tag.python {
  background-color: var(--python-color);
  color: var(--light-text-color);
}

.socials-container {
  display: flex;
  gap: 2rem;
  width: 100%;
  justify-content: center;

  a {
    display: grid;
    place-items: center;
    color: inherit;
    text-decoration: none;
    
    svg {
      color: inherit;
      width: 2rem;
      height: auto;
    }
  }
}

@media screen and (700px <= width) {

  body {
    --hero-image-offset: 6rem;
    display: grid;
    justify-items: center;
  }
  
  section.hero {
    display: flow-root;
    background-color: var(--darker-background);
    max-width: 80%;
    margin-top: var(--hero-image-offset);
    box-shadow: var(--shadow-preset);
    
    .image-container {
      box-shadow: var(--shadow-preset);
      float: left;
      margin-left: calc(var(--hero-image-offset) * -1);
      margin-top: calc(var(--hero-image-offset) * -1);
      margin-right: 1rem;
      margin-bottom: 1rem;
      max-width: min(400px, 50%);
      display: flex;
      justify-content: center;
      position: relative;

      p {
        font-size: min(calc(3rem - (1rem - 2vw) * 3), 3rem);
      }
    }

    .about-container {
      display: block;
      text-wrap: pretty;

      h1 {
        text-align: left;
        width: auto;
      }
    }

  }

  section.my-work {
    display: grid;
    justify-content: center;
    gap: 1rem;
    width: 100%;

    .projects-container {
      display: grid;
      width: 100%;
      gap: 2rem;
      grid-template-columns: minmax(200px, 400px) minmax(200px, 400px);
    }
  }

  footer {
    display: flex;
    width: 100%;
    justify-content: space-around;
    gap: 1.5rem;
    padding-block: 3rem;
    padding-inline: 1.5rem;

    .info-container {
      padding: 0;
      display: grid;
      gap: 1.5rem;

      h1 {
        text-align: left;
      }
    }

    .image-container {
      max-width: 100%;

      picture {
        display: inherit;
        justify-content: inherit;
        
        img {
          width: 100%;
        }
      }
    }
  }

  .socials-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    width: fit-content;
    float: right;


    a {
      display: grid;
      place-items: center;
      color: inherit;
      
      svg {
        color: inherit;
        width: 2rem;
        height: auto;
      }
    }
  }

}

@media screen and (1000px <= width) {

  section.hero {
    .about-container {
      padding-right: 100px;
    }
  }

  section.my-work {
    .projects-container {
      grid-template-columns: minmax(200px, 400px) minmax(200px, 400px) minmax(200px, 400px);
    }
  }
}
