/* Article-specific styles */

.article-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.back-link {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  transition: all 0.3s;
  padding: 0.8rem 1.5rem;
  border: 3px solid var(--text);
  background: var(--card-bg);
  box-shadow: 4px 4px 0 var(--text);
}

.back-link:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--text);
}

.article-container {
  margin-bottom: 3rem;
}

.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 4px solid var(--accent);
}

.article-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-header .article-meta {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--meta-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-content h2 {
  font-size: 2rem;
  font-weight: 900;
  margin: 1rem 0 1rem 0;
  color: var(--text);
  position: relative;
  padding-bottom: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
}

.article-content h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--accent);
}

.article-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 2rem 0 1rem 0;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: var(--text);
  text-align: justify;
  text-justify: inter-word; /* optional, improves spacing */
  hyphens: auto;
}

.article-content code {
  background: var(--accent2);
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--text);
  font-family: "Courier New", monospace;
  font-weight: 600;
}

.article-image {
  max-width: 600px; /* or whatever max size you want */
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
  margin-top: 2.5rem;
  display: block;
  border: 4px solid var(--text);
  box-shadow: 6px 6px 0 var(--accent);
}

.article-context {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--meta-text);
  margin-top: 0.5rem;
  margin-bottom: -0.5rem;
  text-align: left;
}

.article-image-vertical {
  max-width: 400px; /* or whatever max size you want */
  width: 100%;
  display: block;
  margin-top: 2.5rem;

  margin-bottom: 1.5rem;
  margin: 2rem auto; /* centers the image */
  border: 4px solid var(--text);
  box-shadow: 6px 6px 0 var(--accent);
}

.image-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--meta-text);
  margin-bottom: 1rem;
  font-style: italic;
  max-width: 600px; /* matches image width */
  margin-left: auto;
  margin-right: auto;
}

.article-footer-nav {
  margin-top: 3rem;
  text-align: center;
}

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--footer-border);
  text-align: center;
  color: var(--meta-text);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .article-wrapper {
    padding: 1.5rem;
  }

  .article-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .article-header h1 {
    font-size: 1.8rem;
  }

  .article-content {
    font-size: 1.05rem;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .article-content h3 {
    font-size: 1.2rem;
  }
}
