/* settings  */
@layer base, components;
@import url("https://fonts.googleapis.com/css2?family=Inter+Tight&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Quicksand&display=swap");

@layer base {
  :root {
    --color-dark: 0 0 0;
    --color-light: 242 242 242;
    --color-primary: 71 160 180;
    --color-secondary: 228 156 95;
    --logo-font: "Inter Tight", sans-serif;
    --serif-font: "PT Serif", serif;
  }

  body {
    color: rgb(var(--color-dark));
    background: rgb(var(--color-light));
  }

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

  p {
    font-family: var(--serif-font);
    font-size: 1.4rem;
    line-height: 2rem;
  }

  ul,
  li {
    list-style: none;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 400;
    margin: 0;
  }

  main {
    width: 90%;
    margin: 0 5%;
  }

  @media (min-width: 768px) {
    main {
      max-width: 1024px;
      margin: 0 auto;
    }
  }

  .header {
    display: flex;
    align-items: center;
    width: 90%;
    height: 120px;
    margin: 0 5%;
  }

  @media (min-width: 768px) {
    .header {
      max-width: 1024px;
      margin: 0 auto;
    }
  }

  .logo {
    display: flex;
    width: 100%;
    font-size: 1.5rem;
    line-height: 1.75rem;
    font-weight: 300;
    color: rgb(var(--color-dark));
    font-family: var(--logo-font);
  }

  nav ul {
    display: flex;
  }

  nav ul li {
    margin-right: 1.5rem;
  }

  nav ul li:last-child {
    margin-right: 0;
  }

  nav ul li a {
    font-size: 1rem;
    line-height: 1.75rem;
    font-weight: 300;
    font-family: var(--logo-font);
    color: rgb(var(--color-dark));
    text-decoration: none;
  }

  nav ul li a:hover {
    color: rgb(var(--color-primary));
  }

  @media (min-width: 768px) {
    .index-main .content {
      display: flex;
      flex-direction: row;
      gap: 2rem;
    }
  }

  .index-main .recent-posts {
    margin-top: 4rem;
    border-top: 1px solid rgb(var(--color-dark) / 0.6);
    padding-top: 2rem;
  }

  .hero-image {
    display: block;
    width: 100%;
    height: auto;
  }

  @media (min-width: 768px) {
    .hero-image {
      height: 400px;
      width: auto;
    }
  }

  .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
  }

  footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 90%;
    margin: 2rem 5%;
    border-top: 1px solid rgb(var(--color-dark) / 0.6);
  }

  footer p {
    font-family: var(--logo-font);
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
    color: rgb(var(--color-dark));
    flex-grow: 1;
  }

  @media (min-width: 768px) {
    .footerContainer {
      max-width: 1024px;
      margin-left: auto;
      margin-right: auto;
    }
  }

  article {
    font-family: var(--serif-font);
    border-bottom: 1px solid rgb(var(--color-dark) / 0.6);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  article:last-child {
    border-bottom: none;
  }

  article h1,
  article h2 {
    font-size: 2rem;
    line-height: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }

  article h2 a {
    text-decoration: none;
    color: rgb(var(--color-secondary));
  }

  article h2 a:hover {
    color: rgb(var(--color-primary));
  }

  article h2 {
    font-size: 2.5rem;
    line-height: 3rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: rgb(var(--color-primary));
  }

  .post-list article h2 {
    font-size: 2rem;
    line-height: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgb(var(--color-secondary));
  }

  article time {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
    color: rgb(var(--color-dark));
    margin-bottom: 1rem;
    font-family: var(--sans-font);
  }

  article p {
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
  }

  .post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgb(var(--color-dark) / 0.6);
    padding-bottom: 1rem;
  }

  .post-header time {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
    color: rgb(var(--color-dark));
    margin-bottom: 0.5rem;
    font-family: var(--sans-font);
  }

  .post-header h1 {
    font-size: 2.5rem;
    line-height: 2.5rem;
    font-weight: 600;
    margin-top: 1rem;
    color: rgb(var(--color-secondary));
  }

  .post-content h2 {
    font-size: 1.6rem;
  }

  .project-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
  }

  .project-type,
  .project-status,
  .project-tech {
    display: inline-block;
    font-size: 0.8rem;
    font-family: var(--logo-font);
    font-weight: 400;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .project-type {
    background: rgb(var(--color-primary) / 0.12);
    color: rgb(var(--color-primary));
  }

  .project-status {
    background: rgb(var(--color-secondary) / 0.12);
    color: rgb(var(--color-secondary));
  }

  .project-tech {
    background: rgb(var(--color-dark) / 0.07);
    color: rgb(var(--color-dark) / 0.6);
  }

  .post-list article.project-has-image {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }

  .project-body {
    flex: 1;
    min-width: 0;
  }

  .project-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: auto;
    border-radius: 0.25rem;
    object-fit: cover;
  }

  @media (max-width: 767px) {
    .post-list article.project-has-image {
      flex-direction: column;
    }

    .project-thumbnail {
      width: 100%;
      max-height: 200px;
      object-fit: cover;
    }
  }

  .project-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 1rem;
    font-family: var(--logo-font);
    color: rgb(var(--color-primary));
  }

  .project-link:hover {
    color: rgb(var(--color-secondary));
  }

  .section-intro {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgb(var(--color-dark) / 0.6);
  }

  .list {
    display: flex;
  }

  .list li {
    margin-right: 1.25rem;
  }

  .list li:last-child {
    margin-right: 0;
  }

  .list li a:hover svg {
    fill: rgb(var(--color-primary) / 1);
  }

  .list li svg {
    fill: rgb(var(--color-dark) / 1);
    width: 2rem;
  }
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  font-family: var(--serif-font);
  font-size: 1.2rem;
}

.pagination a {
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: rgb(var(--color-primary));
  transition: all 0.3s ease;
}

.pagination a:hover {
  background-color: rgb(var(--color-primary));
  color: rgb(var(--color-light));
}

.pagination .page-item.active a {
  background-color: rgb(var(--color-primary));
  color: rgb(var(--color-light));
  font-weight: bold;
  cursor: not-allowed;
}

.pagination .page-item.disabled a {
  color: rgb(var(--color-dark) / 0.4);
  background-color: transparent;
  cursor: not-allowed;
}

/* Responsive adjustments for small screens */
@media (max-width: 767px) {
  .pagination {
    flex-wrap: wrap;
    font-size: 0.9rem;
  }

  .pagination a {
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
  }
}

@layer components {
  /* major listings */
  ul:has(h2, h3) {
    list-style-type: none;
    margin-block: 3rem;
    padding: 0;

    a {
      text-decoration: none;
    }

    h3,
    p {
      margin-block: 0.25em;
    }

    p {
      color: var(--base-600);
    }

    time {
      color: var(--base-400);
    }

    li {
      margin-bottom: 2em;
      &:hover h3 {
        text-decoration: underline;
      }
    }
  }
}

