:root {
  --font-serif: ivypresto-display, Georgia, serif;
  --font-sans: Satoshi, halyard-display, -apple-system, sans-serif;
  --font-mono: input-mono, PT Mono, Consolas, Monaco, "Andale Mono",
    "Ubuntu Mono", monospace;
  font-family: var(--font-serif);

  --nav-height: 60px;
  --footer-height: 650px;
  --section-margin-bottom: 5rem;

  /* LIGHT MODE */
  /* --pure-background-color: #ffffff;
  --primary-color: #edf0f8;
  --primary-color-rgb: 237, 240, 248;
  --accent-color: rgb(44, 67, 110);
  --accent-color-rgb: 44, 67, 110; 
  --heading-color: rgba(0, 0, 0, 0.7);
  --text-color: #1c1c1c;
  --text-color-rgb: 28, 28, 28;
  --off-text-color: #3a3a3a;
  --pure-text-color: #000000;
  --background-without-opacity: rgba(255, 255, 255, 0.7);
  --box-shadow-color: rgba(0, 0, 0, 0.1);
  --works-on-accent-bg: var(--pure-background-color);
  --semitransparent-bg: rgba(255, 255, 255, 0.5);
  --footer-bg: rgba(220, 220, 220, .8);
  --noise-opacity: .35 */

  /* DARK MODE */
  --pure-background-color: #000000;
  --primary-color: rgb(22, 25, 26);
  --primary-color-rgb: 22, 25, 26;
  --accent-color: rgb(76, 159, 247);
  --accent-color-rgb: 76, 159, 247;
  --heading-color: rgba(255, 255, 255, 0.7);
  --text-color: #f2f2f2;
  --text-color-rgb: 242, 242, 242;
  --off-text-color: #e3e3e3;
  --pure-text-color: #ffffff;
  --background-without-opacity: rgba(0, 0, 0, 0.7);
  --box-shadow-color: rgba(0, 0, 0, 0.1);
  --works-on-accent-bg: var(--pure-background-color);
  --semitransparent-bg: rgba(255, 255, 255, 0.08);
  --footer-bg: var(--semitransparent-bg);
  --noise-opacity: 0.15;
}

/* * {
  transition: color 300ms linear, background 300ms linear;
  -webkit-transition: color 300ms linear, background 300ms linear;
  -moz-transition: color 300ms linear, background 300ms linear;
  -ms-transition: color 300ms linear, background 300ms linear;
  -o-transition: color 300ms linear, background 300ms linear;
} */

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
  touch-action: manipulation;
  scroll-padding-top: var(--nav-height);
  background: var(--primary-color);
}

body,
html {
  overflow-x: clip;
}

body {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  background-color: var(--primary-color);
  background: linear-gradient(
    to bottom right,
    rgba(var(--primary-color-rgb), 1) 20%,
    rgb(var(--accent-color-rgb), 1) 200%
  );
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--pure-text-color);
  color: var(--primary-color);
}

@supports (text-shadow: 0px 0px 2px var(--accent-color)) {
  ::selection {
    background: none;
    text-shadow: 0px 0px 2px var(--pure-background-color);
    color: var(--accent-color);
  }
}

#svelte {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

#home {
  min-height: 100vh;
}

.visible {
  opacity: 1 !important;
}

h1,
h2 {
  font-weight: 400;
  color: var(--text-color);
}

p,
li {
  color: var(--pure-text-color);
  font-family: var(--font-sans);
  font-size: 1.275rem;
  line-height: 1.35;
  /* letter-spacing: -.01rem; */
  font-weight: 300;
}

li {
  margin-left: 1rem;
  list-style-position: outside;
  font-weight: 300;
  line-height: 1.5;
  /* margin-bottom: 0.5rem; */
}

strong {
  font-weight: 600;
  font-weight: 500;
  color: var(--pure-text-color);
}

em {
  font-style: italic;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.85rem;
}

h3 {
  font-size: 1.65rem;
}

h4 {
  font-size: 1.5rem;
}

h5,
h6 {
  font-size: 1.35rem;
}

hr {
  color: var(--accent-color);
  opacity: 0.3;
}

iframe {
  width: 100%;
  left: 0;
  box-shadow: 1px 1px 6px 1px var(--box-shadow-color);
  margin: 1rem 0 2rem 0 !important;
  z-index: 3;
  position: relative;
}

/* This breakpoint is intentionally higher than the regular mobile breakpoint */
/* UNCOMMENT TO ALLOW IFRAMES TO BE FULLBLEED */
/* @media screen and (min-width: 1100px) {
  iframe {
    position: relative;
    left: calc(-35vw + 50%);
    width: 70vw;
  }
} */

/* On blog posts, we make code chunks and iframes larger than content width */
/* We do this instead so that iframes are not centered but instead right justified */
@media screen and (min-width: 1100px) {
  iframe {
    width: 75vw;
    max-width: 1100px;
  }

  pre {
    width: max-content;
    min-width: 100%;
    max-width: 75vw;
  }
}

pre {
  font-size: 0.9rem !important;
  margin-bottom: 1rem !important;
  border-radius: 3px;

  border: 1px solid rgba(var(--accent-color-rgb), 0.65);
  /* box-shadow: 0 0 25px rgba(var(--accent-color-rgb), 0.235); */

  /* border-radius: 0.5rem; */
}

code:not(pre > code) {
  font-family: var(--font-mono);
  background: var(--primary-color);
  background: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  padding: 3px 5px;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  -ms-border-radius: 3px;
  -o-border-radius: 3px;
  font-size: 0.825em;
  font-weight: 600;
  box-decoration-break: clone;
}

input,
button {
  font-size: inherit;
  font-family: inherit;
}

.uppercase {
  text-transform: uppercase;
}

.centered {
  text-align: center;
}

button:focus:not(:focus-visible) {
  outline: none;
}

.button {
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  -ms-border-radius: 3px;
  -o-border-radius: 3px;
  box-shadow: 1px 1px 6px var(--box-shadow-color);
  padding: 6px 10px;
  position: relative;
  z-index: 1;
  font-weight: 200;
  background: var(--semitransparent-bg);
  color: var(--pure-text-color);
}

.button:focus,
.button:active {
  color: var(--pure-text-color);
}

.button:before {
  position: absolute;
  content: "";
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  -ms-border-radius: 3px;
  -o-border-radius: 3px;
  background-image: linear-gradient(
    135deg,
    var(--semitransparent-bg) 10%,
    /* var(--pure-background-color) 30%, */ rgba(var(--accent-color-rgb), 0.4)
      150%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 250ms linear;
  -webkit-transition: opacity 250ms linear;
  -moz-transition: opacity 250ms linear;
  -ms-transition: opacity 250ms linear;
  -o-transition: opacity 250ms linear;
}

.button:hover::before {
  opacity: 1;
}

.pulled-right {
  margin-left: auto;
  text-align: right;
}

.page-overline {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.64px;
  font-weight: 300;
  margin-top: 1.25rem;
  margin-bottom: -1.5rem;
}

.page-title {
  font-size: 9rem;
  font-weight: 200;
  margin: 2rem 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(var(--accent-color-rgb), 0.5);
  overflow: hidden;
  text-transform: uppercase;
  text-align: center;
}

.section-title {
  font-size: 5rem;
  font-weight: 200;
  margin: 2rem 0 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 0.5px solid var(--accent-color);
  overflow: hidden;
}

/* We set opacity of transitioning elements to 0 to prevent brief paint before opacity transitions 
But for users who prefer reduced motion, we don't want to apply this 
(they would never become visible because transitions never trigger) */
@media (prefers-reduced-motion: no-preference) {
  .transition-title,
  .transition-subtitle,
  .transition-content,
  .begin-invisible:not(.transitioned) {
    opacity: 0;
  }
}

.overflow-hidden {
  overflow: hidden;
}

.gradient-accented {
  color: var(--accent-color);
}

/* FIXME: Leads to bug on safari */
/* @supports ((background-clip: text) or (-webkit-background-clip: text)) and ((text-fill-color: transparent) or (-webkit-text-fill-color: transparent)) {
  .gradient-accented {
      background: linear-gradient(to right, var(--pure-text-color) 10%, var(--accent-color) 60%);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      box-decoration-break: clone;
      -webkit-box-decoration-break: clone;
  }
} */

.accented {
  color: var(--accent-color);
}

.bolded {
  font-weight: 500;
}

.padding-bottom {
  padding-bottom: 0.2rem;
}

.border-top {
  border-top: 1px solid var(--accent-color);
  border-top: 0.5px solid var(--accent-color);
  padding-top: 1.5rem;
}

.border-bottom {
  border-bottom: 1px solid var(--accent-color);
  border-bottom: 0.5px solid var(--accent-color);
  padding-bottom: 1.5rem;
}

.no-border {
  border: none;
}

.block {
  display: block;
}

a:not(.no-underline) {
  position: relative;
  color: var(--accent-color);
  background: linear-gradient(var(--accent-color), var(--accent-color)) left
    bottom no-repeat;
  background-size: 0% 1px;
  font-weight: 500;
  transition: background-size 0.25s ease-out;
  -webkit-transition: background-size 0.25s ease-out;
  -moz-transition: background-size 0.25s ease-out;
  -ms-transition: background-size 0.25s ease-out;
  -o-transition: background-size 0.25s ease-out;
}

a:not(.no-underline):hover {
  background-size: 100% 1px;
}

blockquote {
  border-left: 10px solid var(--accent-color);
  padding: 1rem;
  margin-left: 0.5rem;
  /* background: rgba(var(--accent-color-rgb), 0.1); */
  background: rgba(var(--accent-color-rgb), 0.15);
  backdrop-filter: blur(10px);
}

blockquote p {
  font-size: 1.2rem !important;
}

blockquote p:last-of-type {
  margin-bottom: 0 !important;
}

.twitter-tweet {
  margin: 10px auto;
}

.see-all-flex {
  display: flex;
  justify-content: space-between;
}

/* ALL INDEX.SVELTE PAGES HAVE THIS FOR THEIR MAIN TAG */
.main {
  max-width: 868px;
  width: 95%;
  margin: 0 auto 4rem;
  padding-top: var(--nav-height);
}

/* FORMATTING FOR CONTENT PAGES (BLOG POSTS, PROJECT PAGES, AWARD PAGES */
.top-level {
  /* max-width: 1068px; */
  margin: 0 auto 5vh;
  padding-top: var(--nav-height);
  text-align: center;
  display: flex;
  flex-direction: column;
  width: 90%;
}

.content-title {
  /* font-size: 8rem; */
  font-size: 9vw;
  font-weight: 200;
  margin-bottom: 4rem;
  overflow: hidden;
  margin-top: 2.5rem;
  line-height: 1;
  text-align: center;
}

.content-title.smaller {
  font-size: 7vw;
  margin-bottom: 3rem;
}

.content-title code {
  font-family: inherit !important;
  font-size: inherit !important;
  background: none !important;
}

.content-description {
  font-family: var(--font-sans);
  line-height: 1.2;
  padding-bottom: 3rem;
  font-size: 1.75rem;
  font-weight: 300;
  border-bottom: 1px solid var(--accent-color);
}

.content-description,
.content-description h1,
.content-description h2 {
  font-weight: 300;
}

.main-content {
  max-width: 768px;
  margin: 0 auto;
  width: 90%;
  margin-bottom: 4rem;
}

/* .main-content :not(h1, h2, h3)::selection {
  color: var(--pure-background-color);
  background: var(--pure-text-color);
  text-shadow: none;
} */

/* SMALL DESKTOP BREAKPOINT */
/* TABLET BREAKPOINT */
@media screen and (max-width: 1068px) {
  .page-title {
    font-size: 6rem;
    padding-bottom: 1rem;
  }

  .page-overline {
    font-size: 0.85rem;
  }

  .content-title,
  .content-title.smaller {
    margin-bottom: 2.25rem;
    /* font-size: 5.5rem; */
  }

  .content-description,
  .content-description h1,
  .content-description h2 {
    font-size: 1.5rem;
  }
}

/* TABLET BREAKPOINT */
@media screen and (max-width: 768px) {
  .page-title {
    font-size: 3.5rem;
  }

  .section-title {
    font-size: 4rem;
  }

  .page-overline {
    font-size: 0.75rem;
  }

  /* .content-title, .content-title.smaller {
    font-size: 4rem;
  } */

  .content-description,
  .content-description h1,
  .content-description h2 {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 568px) {
  .top-level {
    margin: 5vh auto 2.5vh;
    text-align: left;
  }

  .page-title {
    font-size: 3.25rem;
  }

  .content-title,
  .content-title.smaller {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-align: left;
  }

  .content-description,
  .content-description h1,
  .content-description h2 {
    font-size: 1.25rem;
  }

  .content-description {
    margin-bottom: 1rem;
    padding-bottom: 2rem;
  }
}

/* MOBILE BREAKPOINT */
@media screen and (max-width: 460px) {
  .main {
    margin-top: 1.5rem;
  }

  .section-title {
    font-size: 3rem;
  }

  .content-title,
  .content-title.smaller {
    font-size: 2.85rem;
  }

  .content-description,
  .content-description h1,
  .content-description h2 {
    font-size: 1.25rem;
  }
}

@media screen and (max-width: 360px) {
  .content-title,
  .content-title.smaller {
    font-size: 2.25rem;
  }

  .section-title {
    font-size: 2.5rem;
  }
}
