.article-list {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  max-width: 100%;
  min-width: 0;
}

.article-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  max-width: 100%;
  min-width: 0;
  padding: 1.5rem;
  text-decoration: none;
}

.article-card:hover {
  border-color: var(--accent);
  opacity: 1;
}

.article-card h2 {
  color: var(--text-color);
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.45rem;
  overflow-wrap: anywhere;
}

.article-card p {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}

.article-meta {
  color: var(--text-muted);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.article-header-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.article-header-row .article-meta {
  font-size: 0.875rem;
  margin: 0;
}

.article-header-row .back-link {
  flex-shrink: 0;
  margin-left: auto;
}

.back-link {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 500;
  gap: 0.4rem;
  margin-bottom: 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  opacity: 1;
}

.back-link-icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.back-link:hover .back-link-icon {
  transform: translateX(-3px);
}

/* Centered column with side padding — do not set max-width on .article-page (it overrides .container) */
main.container.article-page {
  box-sizing: border-box;
  margin-inline: auto;
  max-width: min(var(--content-max-width), 100%);
  padding-inline: var(--page-padding-x);
  padding-block: 2rem 5rem;
  width: 100%;
}

.article-post,
.article-content,
.article-section {
  max-width: 100%;
  min-width: 0;
}

.article-header {
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
}

.article-title {
  font-size: clamp(1.9rem, 4.5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
  overflow-wrap: anywhere;
}

.article-header .article-summary {
  color: var(--text-muted);
  font-size: clamp(1.02rem, 2.2vw, 1.15rem);
  line-height: 1.65;
  margin: 0 0 1.1rem;
  max-width: 40rem;
  overflow-wrap: anywhere;
}

.article-tags {
  margin: 0;
}

.article-share {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.article-share-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-share-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.article-share-button {
  align-items: center;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-color);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  justify-content: center;
  padding: 0.45rem;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.article-share-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

.article-share-copy {
  background: transparent;
}

.article-content {
  display: grid;
  gap: 2rem;
  width: 100%;
}

.article-section {
  width: 100%;
}

.article-section h2 {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}

.article-section p {
  color: #dbe4ef;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.65;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}

.article-inline-link {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #93c5fd;
  font-size: inherit;
  font-weight: 500;
  padding: 0.1em 0.38em;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.article-inline-link:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  opacity: 1;
}

.article-inline-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.article-inline-link::after {
  content: "↗";
  display: inline-block;
  font-size: 0.78em;
  margin-left: 0.2em;
  opacity: 0.65;
  transform: translateY(-0.05em);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.article-inline-link:hover::after {
  opacity: 1;
  transform: translate(1px, -2px);
}

.article-inline-code {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  font-weight: 500;
  padding: 0.12em 0.4em;
  white-space: break-spaces;
}

.article-section .article-prose-list {
  color: #dbe4ef;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  max-width: 100%;
  padding-left: clamp(1.1rem, 4vw, 1.5rem);
}

.article-section .article-prose-list li {
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}

.article-section .article-prose-list li::marker {
  color: var(--accent);
}

.article-section ul.article-prose-list {
  list-style-type: disc;
}

.article-section ol.article-prose-list {
  list-style-type: decimal;
}

.article-figure {
  margin: 1.5rem 0;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.article-image {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  display: block;
  height: auto;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  object-fit: contain;
}

.article-figure figcaption {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.65rem;
  text-align: center;
}

.code-block {
  background: #0d1117;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  margin: 1.5rem 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.code-block-header {
  align-items: center;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--card-border);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  gap: 0.35rem 0.75rem;
  justify-content: space-between;
  padding: 0.55rem 1rem;
}

.code-block-label {
  color: var(--text-color);
}

.code-lang {
  text-transform: lowercase;
}

.code-highlight {
  max-width: 100%;
  min-width: 0;
}

.code-highlight pre {
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 1.15rem clamp(0.85rem, 3vw, 1.25rem);
}

.code-highlight code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.78rem, 2.2vw, 0.88rem);
  line-height: 1.65;
  white-space: pre;
}

@media (max-width: 640px) {
  :root {
    --page-padding-x: 1rem;
  }

  main.container.article-page {
    padding-block: 1.25rem 3rem;
  }

  .article-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
  }

  .article-title {
    font-size: clamp(1.65rem, 6vw, 2.1rem);
  }

  .article-content {
    gap: 1.5rem;
  }

  .page-title {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
  }

  .article-card {
    padding: 1.15rem;
  }
}

.empty-state {
  border: 1px dashed var(--card-border);
  border-radius: 18px;
  color: var(--text-muted);
  margin-top: 2.5rem;
  padding: 2rem;
}

