/* articles.css */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ARTICLE VIEW “BOX” */
.article-content {
  width: 90%;
  max-width: 900px;             /* same max as projects/contact boxes */
  margin: var(--spacing) auto;   /* uniform gap above & below */
  padding: var(--spacing);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  text-align: left;              /* boxy = left‑aligned */
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Headings inside an article get a boxed underline */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: var(--spacing);
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.article-content p {
  margin: 0.75rem 0;
  text-align: justify;
}

.article-content img {
  display: block;
  max-width: 100%;
  margin: var(--spacing) auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

/* ARTICLES LIST “BOX” */
.articles-section {
  width: 90%;
  max-width: 900px;            
  margin: var(--spacing) auto;
  padding: var(--spacing);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  text-align: left;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* Header */
.articles-title {
  margin: 0;
  margin-bottom: 0.75rem;
  font-size: 2rem;
  color: var(--text-primary);
}

.filters {
  margin-bottom: var(--spacing);
  /* no extra padding needed—section already has it */
}

.filters input {
  width: 100%;              /* fill the section’s content width */
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  border-radius: var(--radius);
  transition: var(--transition);

  box-sizing: border-box;   /* include padding/border in that 100% */
}

/* List layout */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
  list-style: none;
  padding: 0;
}

/* Each card */
.article-item {
  padding: var(--spacing);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  display: block;
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-link {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.article-link:hover {
  border-bottom-color: var(--text-primary);
}

.article-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-description {
  margin-top: 0.25rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .articles-section,
  .article-content {
    padding: 0.75rem;
    margin: 1rem auto;
  }
  .articles-title {
    font-size: 1.75rem;
  }
  .filters input {
    font-size: 0.95rem;
  }
  .article-link {
    font-size: 1rem;
  }
  .article-description {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .articles-section,
  .article-content {
    width: 95%;
    padding: 0.5rem;
    margin: 0.75rem auto;
  }
  .articles-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  .filters input {
    padding: 0.4rem;
    font-size: 0.9rem;
  }
  .article-link {
    font-size: 0.9rem;
  }
  .article-date {
    font-size: 0.8rem;
  }
  .article-description {
    font-size: 0.9rem;
  }
}
