/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/geist-mono@latest/latin-400-normal.ttf) format('truetype');
}

/* GLOBAL */
body {
  max-width: 100vw;
  overflow-x: hidden;
  font-size: 14px;
  background-color: var(--bg);
  fill: currentColor;

  --white: #ffffff;
  --black: #2A2E38;
  --light-grey: rgb(224, 226, 231);
  --extra-light-grey: rgb(241 243 246);
  --blue: #1551d8;
  --light-blue: #7d9dff;
  --trans-bg: #ffffffd9;
  --font-family: 'Geist Mono', monospace;
  --heading-family: var(--font-family);
  --heading-weight: 900;
  --copy-family: var(--font-family);
  --copy-size: clamp(1rem, calc(.5vw + 1rem), 1.1rem);
  --copy-weight: 500;
  --border: 1px solid var(--light-grey);

  /* Dynamic Colors */
  --text-primary: var(--black);
  --text-secondary: var(--blue);
  --bg: var(--white);
}

main {
  padding: 1rem;
  margin: auto;
  width: clamp(300px, calc(85vw + 5px), 750px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-family);
  font-weight: var(--heading-weight);
  color: var(--text-secondary);
  margin-bottom: clamp(5px, calc(5px + 0.5vw), 20px);

}

h1 {
  font-size: clamp(2rem, calc(2vw + 2rem), 2.3rem);
}

h2 {
  font-size: clamp(1.25rem, calc(2vw + 1.25rem), 1.7rem);
}

h3 {
  font-size: clamp(1.15rem, calc(2vw + 1.15rem), 1.3rem);
}

p,
a,
span:not([class*="hljs-"]),
blockquote,
figcaption {
  font-family: var(--copy-family);
  font-weight: var(--copy-weight);
  color: var(--text-primary);
}

p {
  margin-bottom: 20px;
  font-size: var(--copy-size);
  line-height: 1.6rem;
}

a {
  color: var(--text-secondary);
}

a:hover,
a:focus {
  text-decoration: underline;
  border: none;
  outline: none;
}

ul:not(article ul) {
  list-style: none;
}

ul.list {
  list-style: disc;
  color: var(--blue);
  margin: 0;
  padding: 0;
  padding-left: 1rem;
  margin: 25px 0;
}

article ul {
  padding-left: revert;
}

li {
  color: var(--text-primary);
  font-size: var(--copy-size);
  font-family: var(--copy-family);
  font-weight: var(--copy-weight);
  margin-bottom: clamp(.75rem, calc(0.5vw + .1rem), 1rem);
}

ol {
  color: var(--text-primary);
  padding-left: revert;
}

ul,
ol {
  margin-bottom: 20px;
}

img {
  max-width: 100%;
}

figure {
  margin: auto;
  margin-bottom: 20px;
  max-width: 650px;
}

figure>img {
  margin-bottom: 10px;
}

figcaption {
  font-style: italic;
}

code[class*='language-'],
pre[class*='language-'],
code * {
  font-family: monospace !important;
}

pre {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}

pre.mermaid {
  display: flex;
  justify-content: center;
  align-items: center;
}

code:not(pre>code) {
  background-color: #f2f2f2;
  color: #263E52;
  font-size: 1rem;
  padding: 3px 5px;
  border-radius: 5px;
}

blockquote {
  margin: 3rem auto;
  border-left: 3px solid var(--text-secondary);
  font-size: clamp(1rem, calc(0.5vw + 1.2rem), 1.8rem);
  padding-left: 1.2rem;
  font-style: italic;
}

blockquote p {
  font-size: clamp(1rem, calc(0.5vw + 1.2rem), 1.4rem);
  line-height: 1.8rem;
}

/* UTILITIES */
.visually-hidden {
  visibility: hidden;
  height: 0;
  width: 0;
}

.big-copy {
  transform: scale(1.2);
  width: 70%;
  margin: 20px 0;
  margin-bottom: 40px;
}

.card {
  border: var(--border);
  border-radius: 12px;
  padding: 16px;
}

.card a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
}

.card a:hover>h3 {
  text-decoration: underline;
}

.card a>p {
  color: var(--text-primary);
  font-size: calc(var(--copy-size) * 0.8);
  line-height: 16px;
}

.card * {
  margin: 0;
}

.card .tags {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 5px;
}

.card .tags span {
  font-size: calc(var(--copy-size) * 0.8);
  background-color: var(--light-grey);
  padding: 4px;
  border-radius: 5px;
}

.links-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.links-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  color: var(--text-primary);
  background-color: var(--extra-light-grey);
  border-radius: 5px;
}

.links-row a svg {
  width: 22px;
}

.strike {
  text-decoration: line-through;
}

.flex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-direction: column;
}

.mobile-hide {
  display: none;
}

.out::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 3px;
  margin-bottom: 0.5%;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-block;
  white-space: nowrap;
}

.twitter-tweet.twitter-tweet-rendered {
  margin: 10px auto;
}

header span {
  font-size: clamp(1.1rem, calc(1vw + 1rem), 1.35rem);
  font-family: var(--heading-family);
  color: var(--text-secondary);
}

header nav {
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(.5rem, 2vw, 30px);
}

header a {
  text-decoration: none;
  display: block;
  font-size: clamp(1rem, calc(.3rem + 1vw), 1.2rem);
  font-family: var(--heading-family)
}

header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(12px, 3vw, 30px) 1rem;
  margin: auto;
  width: clamp(380px, calc(85vw + 5px), 750px);
  gap: 8px;
}

footer {
  text-align: center;
  margin-top: 5vh;
  margin-bottom: 7vh;
}

footer * {
  font-size: 14px;
  font-family: var(--copy-family);
}

#copyright>span {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

@media screen and (min-width: 400px) {
  header {
    flex-direction: row;
    align-items: center;
  }
}

@media screen and (min-width: 700px) {
  .flex-row {
    flex-direction: row;
  }

  .mobile-hide {
    display: unset;
  }
}

/* Media Queries */
@media screen and (min-width: 1000px) {
  #resume .mobile-hide {
    display: unset;
  }

  #resume.article-wrap {
    grid-template-columns: 2fr 1fr;
  }
}

@media print {
  #resume .print-hide {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    --text-primary: #e0e3f5;
    --text-secondary: var(--text-primary);
    --bg: #191b20;
    --copy-weight: 400;
    --light-grey: rgb(77, 78, 81);
    --extra-light-grey: #373839;
  }

  code:not(pre>code) {
    background-color: #333741;
    color: #f2f2f2;
  }

  .mermaid .flowchart-link:not(.nodes .flowchart-link) {
    filter: invert(1);
  }

  .out:after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
  }
}