@import "_variables.css";

.post-content,
.project-content {
  text-align: justify;

  /* Code Formatting */
  pre {
    background-color: var(--highlight-background-light);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
  }

  code {
    font-family: "MesloLGL", "Menlo", "Meslo LG", monospace;
    font-size: 0.9em;
    background-color: var(--highlight-background-light);
    padding: 0.2em 0.4em;
    border-radius: 4px;
  }

  /* Table Styles */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
  }

  th,
  td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color-light);
  }

  th {
    background-color: var(--highlight-background-light);
    font-weight: bold;
  }

  /* Blockquote Styles */
  blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid var(--border-color-light);
    color: var(--meta-color-light);
  }

  /* Horizontal Rule Styles */
  hr {
    border: none;
    border-top: 2px solid var(--border-color-light);
    margin: 2rem 0;
  }

  /* Link Styles */
  a {
    color: var(--special);
    text-decoration: none;
    border-bottom: 1px solid var(--link-underline-light);
    transition: border-bottom-color 0.3s;

    &:hover {
      border-bottom-color: var(--special);
    }
  }

  /* Image Styles */
  img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
  }

  /* List Styles */
  ul,
  ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
  }

  li {
    margin-bottom: 0.5rem;
  }

  /* Paragraph Styles */
  p {
    margin-bottom: 1rem;
  }

  /* Heading Styles */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-bottom: 1rem;
    color: var(--heading-color);
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  h4 {
    font-size: 1.5rem;
  }

  h5 {
    font-size: 1.25rem;
  }

  h6 {
    font-size: 1rem;
  }
}

/* Dark Mode Styles for Markdown Content */
body.dark-mode {
  .post-content,
  .project-content {
    pre {
      background-color: var(--highlight-background-dark);
    }

    code {
      background-color: var(--highlight-background-dark);
    }
  }
  @media (max-width: 37.5em) {
    .post-content,
    .project-content {
      padding: 0.625rem;
    }

    ul,
    ol {
      margin-left: 1rem;
    }

    p,
    blockquote,
    pre,
    code,
    img,
    table,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      margin-left: 0;
      margin-right: 0;
    }
  }
}
