/* See font licenses at: https://resume.matchu.dev/licenses.txt */
@font-face {
  font-family: "Lato";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(/assets/Lato-Regular.ttf) format("truetype");
}
@font-face {
  font-family: "Lato";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url(/assets/Lato-Bold.ttf) format("truetype");
}
@font-face {
  font-family: "Lato";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url(/assets/Lato-Italic.ttf) format("truetype");
}

body {
  font-family: "Lato", sans-serif;
  margin: 0;
  padding: 0;
}

/**
 * I want links to look standard-but-fun, so I picked a bold blue!
 * But I still want *a* clear visited effect, but not such an aggressive
 * one as the default purple behavior, because I think that makes visited
 * things look too sad? So I went with a darker, less saturated blue.
 */
a {
  color: var(--sl-color-blue-700);
}
a:visited {
  color: var(--sl-color-cyan-800);
}
@media print {
  a,
  a:visited {
    color: inherit;
    text-decoration: inherit;
  }
}

.cover-letter {
  min-height: 100vh;
  background: var(--sl-color-blue-200);
  color: var(--sl-color-blue-900);
  padding-inline: 1em;
  padding-block: 2em;
  box-sizing: border-box;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2em;

  header {
    display: grid;
    grid-template-areas:
      "hshot gutter1"
      "hshot heading"
      "hshot info"
      "hshot gutter2";
    grid-template-rows: 1fr auto auto 1fr;
    align-items: center;
    row-gap: 1em;
    column-gap: 1em;
    max-width: 1000px;
    z-index: 1;

    @media (max-width: 500px) {
      grid-template-areas:
        "hshot"
        "heading"
        "info";
      grid-template-rows: auto auto auto;
      justify-items: center;
      text-align: center;
    }

    .headshot {
      grid-area: hshot;
      border-radius: 100%;
      width: 200px;
      height: 200px;
    }

    h1 {
      grid-area: heading;
      margin: 0;
      font-size: 3em;
    }

    p {
      grid-area: info;
      margin: 0;
      font-size: 1.25em;
      font-style: italic;
    }
  }

  .letter-body {
    background: white;
    border: 1px solid var(--sl-color-blue-400);
    padding-inline: 2em;
    max-width: 800px;
    box-sizing: border-box;
    z-index: 1;

    line-height: 1.4;
  }

  .resume-tip {
    font-size: 85%;
    text-decoration: none;
    z-index: 1;
    color: inherit;

    &:is(:hover, :focus) {
      text-decoration: underline;
    }

    @media print {
      display: none;
    }
  }

  #background-effects {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }
}

main {
  padding: var(--sl-spacing-medium);
  max-width: 50em;
  margin: 0 auto;
  break-before: page;
}

.resume-header {
  display: grid;
  grid-template-areas:
    "name info"
    "tags tags";
  grid-template-columns: 1fr auto;
  align-items: center;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--sl-color-gray-400);
}
.my-name {
  grid-area: name;
  font-size: 2em;
  margin: 0; /* Reset default header styles */

  display: flex;
  align-items: center;
  gap: 0.25em;

  .headshot {
    border-radius: 100%;
    width: 1.5em;
    height: 1.5em;
  }
}
.basic-info {
  grid-area: info;
  font-size: var(--sl-font-size-small);
  opacity: 0.85;
}
.basic-info > div {
  display: flex;
  gap: var(--sl-spacing-x-small);
  justify-content: flex-end;
  text-align: right;
}
.pronouns {
  font-style: italic;
}
.resume-header .tags {
  grid-area: tags;
  margin-top: var(--sl-spacing-2x-small);
  max-width: 500px;
}
/* On smaller screens, stack the page header vertically instead of horizontally. */
@media (max-width: 500px) {
  .resume-header {
    grid-template-areas:
      "name"
      "info"
      "tags";
    justify-items: center;
    text-align: center;
  }
  .basic-info > div {
    justify-content: center;
    text-align: center;
  }
  .resume-header .tags {
    justify-content: center;
    margin-top: var(--sl-spacing-x-small);
  }
}

.category {
  break-inside: avoid;
}
.category header {
  display: grid;
  grid-template-areas: "logo title notes";
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: var(--sl-spacing-x-small);
  margin-top: var(--sl-spacing-small);
  margin-bottom: var(--sl-spacing-small);
}
.category header h2 {
  grid-area: title;
  font-size: var(--sl-font-size-x-large);
  margin: 0;
}
.category header h2 a {
  color: inherit;
  text-decoration: none;
}
.category header h2 a:is(:hover, :focus) {
  text-decoration: underline;
}
.category header .logo {
  grid-area: logo;
  width: calc(var(--sl-font-size-x-large) * 1.2);
  height: calc(var(--sl-font-size-x-large) * 1.2);
  border-radius: 4px;
}
.category header .notes {
  grid-area: notes;
  font-size: var(--sl-font-size-x-small);
  text-align: center;
  padding: var(--sl-spacing-x-small);
  background: var(--sl-color-blue-50);
  max-width: 22ch;
  /* Enforce a min size of two lines, regardless of content,
   * because the header container's small margins are based on the
   * assumption that this notes box will be tall!
   *
   * (I don't think this content can ever be less under most viewing
   * circumstances right now, but I want the assurance!) */
  box-sizing: content-box;
  line-height: 1.2;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;

  @media print {
    border: 1px solid var(--sl-color-blue-100);
  }
}
.category footer {
  text-align: center;
  font-style: italic;
  font-size: var(--sl-font-size-small);
}
/* Decrease title size on smaller screens so it all fits! */
@media (max-width: 600px) {
  .category header h2 {
    font-size: var(--sl-font-size-large);
  }
}
/* On even smaller screens, move the blue box below the header,
 * instead of on the right. */
@media (max-width: 500px) {
  .category header {
    grid-template-areas:
      "notes notes"
      "logo title"
      "tags tags";
    grid-template-columns: auto 1fr;
    row-gap: var(--sl-spacing-small);
  }
  .category header .notes {
    min-height: 0;
    max-width: none;
  }
}

.role {
  display: grid;
  grid-template-areas:
    "title duration"
    "content empty";
  grid-template-columns: 1fr auto;
  column-gap: var(--sl-spacing-small);
  align-items: center;
}
.role h3 {
  font-weight: normal;
  grid-area: title;
  margin: 0;
}
.role .duration {
  grid-area: duration;
  font-size: var(--sl-font-size-small);
}
.role ul {
  grid-area: content;
}
.role li {
  font-size: var(--sl-font-size-small);
  margin-bottom: var(--sl-spacing-x-small);
  line-height: var(--sl-line-height-dense);
}
.role li:last-of-type {
  margin-bottom: 0;
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);
  flex-wrap: wrap;
  align-items: flex-start;
}
.tags li {
  font-size: var(--sl-font-size-x-small);
  text-transform: uppercase;
  background: var(--sl-color-blue-200);
  padding: var(--sl-spacing-3x-small) var(--sl-spacing-2x-small);
  border-radius: var(--sl-spacing-2x-small);
  color: var(--sl-color-blue-900);
}
.tags a {
  color: inherit;
  text-decoration: none;
}
.tags a:is(:hover, :focus) {
  text-decoration: underline;
}

.snacks {
  display: flex;
  flex-direction: row;
  gap: var(--sl-spacing-small);
}
.snack {
  flex: 1 1 0;
}
.snack h3 {
  margin: 0;
  grid-area: title;
}
.snack .duration {
  grid-area: duration;
}
.snack .description {
  grid-area: description;
  font-size: var(--sl-font-size-small);
  line-height: var(--sl-line-height-dense);
}
@media (max-width: 500px) {
  .snacks {
    flex-direction: column;
  }
  .snack {
    display: grid;
    align-items: center;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title        duration"
      "description  description";
  }
}

@media print {
  /* The cover letter will handle this! */
  .intro {
    display: none;
  }
}
