@font-face {
    font-family: Montserrat;
    src: url(/assets/fonts/Montserrat-Regular.ttf);
}

@font-face {
    font-family: SourceSerifPro;
    src: url(/assets/fonts/SourceSerifPro-Regular.ttf);
}

:root {
  --teal: rgb(103, 201, 207);
  --white: rgb(250, 250, 250);
  --black: rgb(10, 10, 10);
  --dark-teal: rgb(50, 104, 108);
  --gray: rgb(80, 80, 80);
  --light-gray: rgb(180, 180, 180);
  --blue: rgb(20, 20, 215);
  --light-blue: rgb(160, 210, 250);
  --background: var(--white);
  --text: var(--black);
  --neutral-text: var(--gray);
  --post-link: var(--dark-teal);
  --link: var(--blue);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: var(--black);
    --text: var(--white);
    --neutral-text: var(--light-gray);
    --post-link: var(--teal);
    --link: var(--light-blue);
  }
}


p, h1, h2, h3, h4, h5, h6, li {
  font-style: normal;
  font-weight: 400;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background-color: var(--background);
  color: var(--text);
}

a {
  color: var(--link);
}

h1 > a {
  font-family: "SourceSerifPro", serif;
  font-size: 36px;
  line-height: 36px;
  font-style: normal;
  font-weight: 400;
  color: var(--white);
  text-decoration: none;
}


.header {
  background-color: var(--teal);
  display: flex;
  justify-content: space-between;
}

.header > h1 {
  padding: 0 24px;
}

.subheader {
  color: var(--white);
  background-color: var(--gray);
  display: flex;

  & h2 {
    font-size: 18px;
    line-height: 18px;
    padding: 0 24px;
  }
}


.menu-button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--white);
  padding: 0 36px 0 0;
}

#menu:popover-open {
  margin: 0;
  position-anchor: auto;
  top: calc(anchor(bottom) - 24px);
  justify-self: anchor-center;
  right: anchor(left);
  display: flex;
  flex-direction: column;
  border-style: solid;
  border-width: 2px;
  border-color: var(--teal);
  border-radius: 6px;
  background-color: var(--dark-teal);
  padding: 5px 45px;
}

.menu-item {
  color: var(--white);
  font-size: 24px;
  font-family: "SourceSerifPro", serif;
  padding: 18px 12px 18px 0;
  border-style: solid;
  border-color: var(--white);
  border-width: 0 0 1px 0;
  text-decoration: none;
}

.menu-item:last-child {
  border-width: 0;
}

.content {
  display: flex;
  flex-direction: column;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-style: solid;
  border-width: 0 1px 0 1px;
  margin: 20px 24px 0 24px;
  padding-top: 18px;
  padding-right: 36px;
  align-self: center;
  max-width: 800px;
}

.post-list div {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.end-of-list {
  font-style: italic;
  padding: 0 36px;
}

.end-of-list > a {
  font-style: italic;
}

.post-preview {
  display: flex;
  padding: 0 24px;
}

.post-preview > a {
  text-decoration: none;
  color: var(--text);
}

.post-preview-title {
  font-size: 18px;
  line-height: 18px;
  color: var(--post-link);
  font-weight: 800;
  font-style: normal;
}

.post-preview-description {
  font-style: italic;
  font-size: 14px;
  line-height: 16px;
  padding-bottom: 12px;
  margin: 8px 0 0 0;
}

.post-title {
  text-decoration: underline;
  font-size: 36px;
  line-height: 36px;
  padding-top: 48px;
}

.post-container {
  display: flex;
}

.post-container::after {
  width: 36px;
  max-width: 4%;
  content: "";
  background: linear-gradient(var(--teal), var(--background));
}

.content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.post-content {
  max-width: 800px;
  width: 90%;
  display: flex;
  flex-direction: column;
  padding: 0 24px 24px 48px;
  margin: 24px 0 0 0;
  line-height: 28px;
}

.post-date {
  font-style: italic;
  font-size: 14px;
  line-height: 14px;
}

.footer {
  color: var(--neutral-text);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 18px 36px;
  border-style: solid;
  border-width: 1px 0 0 0;
  border-color: var(--teal);
  font-size: 14px;
}

.footer > button {
  background: none;
  border: none;
  color: inherit;
}

.footer > a {
  background: none;
  border: none;
  color: inherit;
  text-decoration: none;
}

.subscribe-form {
  display: flex;
  flex-direction: column;

  & input[type="email"] {
    line-height: calc(1em + 24px);
    font-size: 1em;
    padding: 0 12px;
  }

  & input[type="submit"] {
    color: var(--white);
    background-color: var(--teal);
    border-radius: 12px;
    border-style: none;
    font-size: 20px;
    padding: 18px 0;
    margin: 12px 0;
  }

  & p {
    align-self: center;
    font-size: 12px;
    line-height: 12px;
  }

  & a {
    color: var(--post-link);
  }
}

.tag-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  & div {
    display: flex;
    padding: 8px 8px; 
  }
}

.tag-name {
  & button {
    background: none;
    color: var(--text);
    border: none;
    cursor: pointer;
    padding: 4px 10px;
  }
}

.selected-tag-name {
  & button {
    font-weight: 600;
    text-transform: uppercase;
    padding: 0;
 }
}

.tag-browser-list-container {
  & .post-list {
    border: none;
  }
}

.post-image {
  max-height: 60vh;
  max-width: 100%;
}

.post-image-container {
  text-align: center;
}

pre.code-block {
  white-space: pre-wrap;

  & code {
        font-family: monospace;
        font-size: 1.3em;
  }
}

hr {
  border: none;
  border-top: 1px solid black;
}

figcaption {
  font-style: italic;
  font-weight: 400;
  font-size: 0.8em;
  line-height: 1.4em;
}


.search-form {
  display: flex;
  flex-direction: column;

  & input[type=text] {
        line-height: calc(1em + 24px);
        font-size: 1em;
        padding: 0 12px;
        max-width: 500px;
        width: 80%;
  }

}
