/* ============================================================
   styles.css — OpenProject Design System
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  color-scheme: light;
  font-family: "Inter", "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft Yahei",
    system-ui, -apple-system, sans-serif;
  /* colors */
  --bg: #f5f5f3;
  --bg-card: rgba(245, 245, 243, 0.78);
  --bg-input: #f5f5f3;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6b6b6b;
  --text-placeholder: #8b8b9c;
  --accent: #b68b2c;
  --accent-light: rgba(182, 139, 44, 0.15);
  --accent-gradient: linear-gradient(135deg, #b68b2c, #d2a54a);
  --grid: #e0e0e0;
  --grid-subtle: rgba(224, 224, 224, 0.4);
  --tag-bg: #e9e9e4;
  --tag-text: #4a4a4a;
  --border: var(--grid);
  --shadow: 0 16px 32px rgba(26, 26, 26, 0.08);
  --shadow-sm: 0 12px 28px rgba(26, 26, 26, 0.08);
  --radius: 999px;
  --transition: 200ms ease;
  /* loading */
  --loading-dot: #111;
  --loading-track: rgba(0, 0, 0, 0.08);
}

/* ---- Dark Mode ---- */
html.dark {
  color-scheme: dark;
  --bg: #1a1a1a;
  --bg-card: rgba(30, 30, 30, 0.85);
  --bg-input: #2a2a2a;
  --text: #e8e8e8;
  --text-secondary: #b0b0b0;
  --text-muted: #888;
  --text-placeholder: #666;
  --accent: #d2a54a;
  --accent-light: rgba(210, 165, 74, 0.18);
  --grid: #333;
  --grid-subtle: rgba(51, 51, 51, 0.5);
  --tag-bg: #2a2a2a;
  --tag-text: #b0b0b0;
  --border: #333;
  --shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.25);
  --loading-dot: #e8e8e8;
  --loading-track: rgba(255, 255, 255, 0.08);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

html.dark body {
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
}

/* ---- Accessibility ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  z-index: 100;
  text-decoration: none;
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- App Shell ---- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(245, 245, 243, 0.6);
}

html.dark .app {
  background: rgba(26, 26, 26, 0.6);
}

/* ---- Topbar ---- */
.topbar {
  height: 68px;
  display: grid;
  grid-template-columns: 220px auto 1fr auto;
  grid-template-areas: "brand nav search actions";
  align-items: center;
  gap: 16px;
  padding: 0 48px;
  background: rgba(245, 245, 243, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

#brandLogo {
  grid-area: brand;
}

.main-nav {
  grid-area: nav;
}

.search {
  grid-area: search;
}

.top-actions {
  grid-area: actions;
}

html.dark .topbar {
  background: rgba(26, 26, 26, 0.88);
}

/* ---- Brand ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ---- Search ---- */
.search {
  display: flex;
  justify-content: center;
}

.search input {
  width: min(560px, 100%);
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-input);
  outline: none;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search input::placeholder {
  color: var(--text-placeholder);
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ---- Top Actions ---- */
.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---- Buttons ---- */
.ghost {
  border: 1px solid var(--border);
  background: var(--bg-input);
  border-radius: var(--radius);
  padding: 8px 18px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}

.ghost:hover {
  background: var(--tag-bg);
}

.primary {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  padding: 9px 16px;
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  transition: opacity var(--transition);
}

.primary:hover {
  opacity: 0.9;
}

.secondary {
  background: var(--tag-bg);
  border: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--transition);
}

.secondary.is-favorite {
  background: var(--accent-light);
  color: var(--accent);
}

.theme-toggle {
  font-size: 16px;
  padding: 6px 12px;
  line-height: 1;
}

/* ---- Content Grid ---- */
.content {
  display: grid;
  grid-template-columns: 240px 1.1fr 1.3fr;
  gap: 24px;
  padding: 24px 48px 28px;
}

/* ---- Panels ---- */
.sidebar,
.list-area,
.detail-area {
  background: var(--bg-card);
  border-radius: 0;
  padding: 24px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ---- Decorative grid overlay ---- */
.sidebar::before,
.list-area::before,
.detail-area::before,
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-subtle) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.25;
  pointer-events: none;
}

.sidebar > *,
.list-area > *,
.detail-area > *,
.footer > * {
  position: relative;
}

/* ---- List Header ---- */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  background: var(--bg-input);
  color: var(--text);
  cursor: pointer;
}

.result-count {
  font-size: 12px;
  color: var(--text-placeholder);
}

.section-title {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.4px;
}

/* ---- Categories ---- */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item {
  padding: 12px 0;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.category-item:hover {
  background: var(--accent-light);
}

.category-item:last-child {
  border-bottom: none;
}

.category-item.active {
  color: var(--accent);
  font-weight: 600;
}

.category-item.active .tag,
.category-item.active .item-index {
  color: var(--accent);
}

/* ---- Project List ---- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding-right: 8px;
}

.project-list::-webkit-scrollbar {
  width: 6px;
}

.project-list::-webkit-scrollbar-track {
  background: transparent;
}

.project-list::-webkit-scrollbar-thumb {
  background: var(--grid);
  border-radius: 3px;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.page-btn {
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Empty / States ---- */
.empty {
  font-size: 13px;
  color: var(--text-placeholder);
  padding: 20px 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-icon {
  font-size: 40px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.loading-state .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--loading-track);
  border-top-color: var(--loading-dot);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: var(--text-muted);
}

.error-icon {
  font-size: 36px;
}

.error-state p {
  margin: 0;
  font-size: 14px;
}

.retry-btn {
  margin-top: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Project Card ---- */
.project-card {
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 36px 56px 1fr auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  background: transparent;
  transition: transform var(--transition), background var(--transition);
}

.project-card:last-child {
  border-bottom: none;
}

.project-card:hover {
  transform: translateY(-1px);
  background: var(--accent-light);
}

.project-icon {
  width: 52px;
  height: 52px;
  border-radius: 0;
  background: var(--text);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--bg);
  font-size: 15px;
}

html.dark .project-icon {
  background: #e8e8e8;
  color: #1a1a1a;
}

.project-meta h4 {
  margin: 0;
  font-size: 15px;
}

.project-meta p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius);
  background: var(--tag-bg);
  color: var(--tag-text);
}

/* ---- Project Detail ---- */
.project-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail-title h2 {
  margin: 0;
  font-size: 20px;
}

.detail-title .tag {
  margin-top: 4px;
}


.detail-actions {
  display: flex;
  gap: 8px;
}

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--bg-input);
  border-radius: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.stat-card strong {
  font-size: 16px;
  color: var(--text);
}

/* ---- Carousel ---- */
.carousel {
  background: var(--bg-input);
  border-radius: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.carousel-media {
  position: relative;
}

.carousel-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.carousel-image {
  width: 100%;
  height: 200px;
  border-radius: 0;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.2);
  transition: filter var(--transition);
}

html.dark .carousel-image {
  filter: grayscale(40%) contrast(1.1);
}

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius);
  background: #cfcfca;
  cursor: pointer;
  transition: background var(--transition);
}

html.dark .dot {
  background: #555;
}

.dot.active {
  background: var(--accent);
}

/* ---- Detail Sections ---- */
.detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.detail-section {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.detail-section:first-of-type {
  padding-top: 0;
  border-top: none;
}

/* ---- Links ---- */
.link-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.link-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
  background: var(--bg-input);
  transition: background var(--transition), border-color var(--transition);
}

.link-chip:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ---- Footer ---- */
.footer {
  margin-top: 0;
  padding: 24px 48px 20px;
  background: rgba(245, 245, 243, 0.86);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

html.dark .footer {
  background: rgba(26, 26, 26, 0.86);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-content p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-link {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-placeholder);
}

/* ---- Index number ---- */
.item-index {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* ---- Serif headings ---- */
h1, h2, .section-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "Times New Roman", serif;
  letter-spacing: 0.04em;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .content {
    grid-template-columns: 1fr;
  }

  .detail-area {
    order: 3;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav actions" "search search search";
    gap: 8px;
    height: auto;
    padding: 12px 16px;
  }

  .search {
    padding: 4px 0;
  }

  .content {
    padding: 20px 16px 24px;
  }

  .footer {
    padding: 20px 16px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-header {
    flex-direction: column;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions" "nav nav" "search search";
    padding: 10px 12px;
    gap: 6px;
  }

  .main-nav {
    justify-content: center;
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .project-card {
    grid-template-columns: 28px 44px 1fr auto;
    gap: 10px;
  }

  .project-icon {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: background 0.25s ease;
  pointer-events: none;
}

.modal-overlay.visible {
  background: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.modal-card {
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal-overlay.visible .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "Times New Roman", serif;
  letter-spacing: 0.04em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 4px;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 16px 24px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.modal-body a {
  color: var(--accent);
}

/* ---- Submit Form ---- */
.submit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.submit-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.submit-form .required {
  color: #c44;
}

.submit-form input,
.submit-form select,
.submit-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  border-radius: 4px;
  outline: none;
  transition: border-color var(--transition);
}

.submit-form input:focus,
.submit-form select:focus,
.submit-form textarea:focus {
  border-color: var(--accent);
}

.submit-form textarea {
  resize: vertical;
  min-height: 70px;
}

.submit-btn {
  margin-top: 12px;
  width: 100%;
  padding: 12px !important;
  font-size: 14px !important;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-feedback {
  font-size: 13px;
  min-height: 20px;
}

.feedback-success {
  color: #2a7d4f;
}

.feedback-error {
  color: #c44;
}

/* ---- About / Contact content ---- */
.about-content p {
  margin: 0 0 10px;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* ---- Hidden utility ---- */
.hidden {
  display: none !important;
}

/* ---- Main Navigation ---- */
.main-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  background: var(--accent-light);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ---- Views ---- */
#projectsView {
  /* display:contents makes its children direct grid items of .content */
  display: contents;
}

#articlesView {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- Articles Section ---- */
.articles-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.articles-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-subtle) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.25;
  pointer-events: none;
}

.articles-section > * {
  position: relative;
}

.articles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ---- Article Card ---- */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

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

.article-card:hover {
  background: var(--accent-light);
}

.article-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.article-card-summary {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.article-card-tags {
  display: flex;
  gap: 6px;
}

.article-project-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
}

.article-project-link:hover {
  text-decoration: underline;
}

/* ---- Article Detail ---- */
.article-detail-area {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.article-detail-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-subtle) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.25;
  pointer-events: none;
}

.article-detail-area > * {
  position: relative;
}

.article-detail-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.article-back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}

.article-back-link:hover {
  color: var(--text);
}

.article-detail-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-detail-title {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.3;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "Times New Roman", serif;
}

.article-detail-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-detail-tags {
  display: flex;
  gap: 6px;
}

.article-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-detail-content h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  color: var(--text);
}

.article-detail-content h3 {
  font-size: 17px;
  margin: 24px 0 10px;
  color: var(--text);
}

.article-detail-content p {
  margin: 0 0 16px;
}

.article-detail-content pre {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.article-detail-content code {
  background: var(--tag-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

.article-detail-content pre code {
  background: none;
  padding: 0;
}

.article-detail-content ul, .article-detail-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.article-detail-content li {
  margin-bottom: 6px;
}

.article-detail-content strong {
  color: var(--text);
}

.article-detail-content a {
  color: var(--accent);
}

/* ---- Responsive: Articles ---- */
@media (max-width: 1100px) {
  .articles-section,
  .article-detail-area {
    grid-column: 1;
  }
}
