/*** Root Variables */
:root {
  /* Background */
  --background-left: #0f172a;
  --background-right: #0f1e47;

  /* Foreground */
  --dark-30-white: #FFFFFF;
  --dark-30: #EAF6FFF2;
  --dark-faded-30: #94A3B8;
  --dark-inactive-30: #A0A5B6E6;
  --dark-10: #ff9900;
  --dark-transparent-10: #ff8c001c;
  --dark-10-select: #472e00;

  --light-30-black: #000;
  --light-30: #333;
  --light-faded-30: #666;
  --light-inactive-30: #999;
  --light-10: #ff7700;
  --light-transparent-10: #ff77001c;
  --light-10-select: #dd0808;

  /* H1 */
  --h1-font-size: 3rem;
  --h1-font-weight: 800;
  --h1-font-family: Figtree, Helvetica, sans-serif;
  --subtitle-font-size: 1.25rem;
  --subtitle-font-weight: 600;
  --subtitle-font-family: Figtree, Helvetica, sans-serif;

  /* H2 */
  --h2-font-size: 1.5rem;
  --h2-font-weight: 700;
  --h2-font-family: Figtree, Helvetica, sans-serif;

  /* H3 */
  --h3-large-font-size: 1.125rem;
  --h3-large-font-weight: 600;
  --h3-large-font-family: Figtree, Helvetica, sans-serif;
  --h3-small-font-size: .9rem;
  --h3-small-font-weight: 500;
  --h3-small-font-family: Inter, Figtree, Helvetica, sans-serif;

  /* Paragraph */
  --paragraph-font-size: 0.875rem;
  --paragraph-line-height: 1.5em;
  --paragraph-font-family: Inter, Figtree, Helvetica, sans-serif;
  --paragraph-label-font-size: 0.75rem;
  --paragraph-label-font-weight: 500;
}

::selection {
  background: #ffab4a; /* Your preferred color */
  color: var(--dark-10-select); /* Color of the text when selected */
}

/*** Universal */
* {
  box-sizing: border-box;
  color: var(--light-30);
}

html {
  font-family: var(--paragraph-font-family);
  font-weight: 400;
  scroll-behavior: smooth;
}

.container {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

/*** Nav */
.nav {
  align-items: center;
  background: var(--background-right);
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: start;
  padding: 1rem 2rem;
  position: fixed;
  width: 100vw;
  z-index: 100;
}

@media only screen and (max-width: 500px){
  .nav {
    justify-content: center;
  }
}

.nav__logo {
  width: 5em
}

.nav__list {
  align-items: center;
  display: flex;
  margin-left: 2em;
}

@media only screen and (max-width: 500px){
  .nav__list {
    display: none;
  }
}

.nav__item {
  margin: 0 1rem;
}

.nav__link {
  color: var(--dark-30-white);
  font-size: var(--paragraph-font-size);
  font-weight: var(--h3-small-font-weight);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--dark-10);
  transition: color 0.2s;
}

/*** Main */
.main {
  margin: 4.25em auto 2em;
}

.header {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  justify-content: center;
  padding: 2rem 0;
  text-align: center;
}

.header__title {
  color: var(--light-30-white);
  font-family: var(--h1-font-family);
  font-size: var(--h1-font-size);
  font-weight: var(--h1-font-weight);
  padding: 0 3rem;
  max-width: 46rem;
  display: block;
}

@media only screen and (max-width: 768px) {
  .header__title {
    font-size: 1.875rem;
    padding: 0 1em;
  }
}

.entry-meta {
  display: grid;
  grid-template-columns: 1fr 3em 1fr;
  align-items: center;
  gap: 1em;
  justify-content: center;
  max-width: 46em;
  padding: 0 0.5em;
}

@media only screen and (max-width: 500px) {
  .entry-meta {
    grid-template-columns: 3em 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.25em;
  }
}

.entry-meta__author-name {
  color: var(--light-30-white);
  font-size: var(--paragraph-label-font-size);
  font-weight: var(--paragraph-label-font-weight);
  text-align: right;
  margin-left: 0.5em;
}

@media only screen and (max-width: 500px){
  .entry-meta__author-name{
    grid-row: 1 / span 1;
    grid-column: 2 / span 1;
    text-align: left;
    align-self: end;
  }
}

.entry-meta__author-link {
  color: var(--light-10);
  font-size: var(--paragraph-label-font-size);
  font-weight: var(--paragraph-label-font-weight);
  text-decoration: none;
}

.entry-meta__author-link:hover {
  color: var(--light-10-select);
}

.entry-meta__profile-image {
  border-radius: 50%;
  width: 3em;
}

@media only screen and (max-width: 500px) {
  .entry-meta__profile-image {
    grid-row: 1 / span 2;
    grid-column: 1 / span 1;
  }
}

.entry-meta__date {
  color: var(--light-30-white);
  font-size: var(--paragraph-label-font-size);
  font-weight: var(--paragraph-label-font-weight);
  text-align: left;
  margin-left: 0.5em;
}

@media only screen and (max-width: 500px){
  .entry-meta__date{
    grid-row: 2 / span 1;
    grid-column: 2 / span 1;
    align-self: start;
  }
}

.entry-meta__featured-image {
  max-height: 50vh;
  width: 62.5em;
  object-fit: cover;
}

@media only screen and (max-width: 1000px) {
  .entry-meta__featured-image {
    width: 100%;
  }
}

.article {
  margin: 0 auto;
  max-width: 46em;
  font-family: var(--paragraph-font-family);
  color: var(--light-30-black);
  line-height: var(--paragraph-line-height);
  padding: 0 1.5em;
}

.article__intro {
  font-size: var(--paragraph-font-size);
}

.article__section-title {
  font-size: var(--h2-font-size);
  font-weight: var(--h2-font-weight);
  font-family: var(--h2-font-family);
  margin: 2em 0 1em;
}

.article__paragraph {
  font-size: var(--paragraph-font-size);
  margin-bottom: 1rem;
}

.article__paragraph--strong {
  font-weight: 600;
}

.article__subsection {
  margin-bottom: 1rem;
}

.article__subsection-title {
  font-size: var(--h3-large-font-size);
  font-weight: var(--h3-large-font-weight);
  font-family: var(--h3-large-font-family);
  margin-bottom: 0.5rem;
}

.article__list {
  list-style-type: disc;
  margin-left: 2em;
  font-size: var(--paragraph-font-size);
  color: var(--light-30);
}

.article__ordered-list {
  list-style-type: decimal;
  margin-left: 2em;
  font-size: var(--paragraph-font-size);
  color: var(--light-30);
}

.article__link {
  color: var(--light-10);
  text-decoration: none;
}

.article__link:hover {
  color: var(--light-10-select);
  text-decoration: underline;
}


/*** Footer */
.footer {
  align-items: center;
  background-color: var(--background-right);
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 1em;
  width: 100%;
}

.footer__text {
  color: var(--dark-30-white);
  font-size: var(--paragraph-label-font-size);
  line-height: 1.5em;
  max-width: 46rem;
}

@media only screen and (max-width: 1000px) {
  .footer__text {
    text-align: center;
    width: 100%;
  }
}

.article__code-block {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 20px;
  white-space: pre-wrap; /* Since <pre> elements have a default 'white-space: pre', this is used to allow line breaks */
}

.article__code-block code {
  color: #333;
}

.article__paragraph code {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f5f5f5;
  color: #333;
  padding: 2px 4px;
  border-radius: 4px;
}
