:root {
  --surface: #0f1319;
  --card: #151b24;
  --text: #f5f7fa;
  --muted: #cfd9e8;
  --line: rgba(255,255,255,0.08);
  --accent: #9ec5ff;
}

body {
  background: var(--surface);
  color: var(--text);
}

.articles-page { padding-top: 96px; }
@media (max-width: 640px) { .articles-page { padding-top: 88px; } }

.articles-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: center;
  padding: 52px 5vw 32px;
  background: linear-gradient(135deg, #0f1319, #0b1017 40%, #0f1319);
}
.articles-hero .hero-text h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}
.articles-hero .hero-text .eyebrow {
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}
.articles-hero .lede { margin: 0 0 18px; color: var(--muted); max-width: 620px; }
.articles-hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--accent);
  color: #0c1118;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
}
.hero-media img { width: 100%; border-radius: 14px; box-shadow: 0 18px 35px rgba(0,0,0,0.35); }

.articles-layout {
  padding: 26px 5vw 46px;
  display: grid;
  gap: 26px;
}
.articles-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: 0 18px 35px rgba(0,0,0,0.28);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(0,0,0,0.34);
  border-color: rgba(158,197,255,0.4);
}
.article-media { aspect-ratio: 16/9; background: linear-gradient(135deg, #1f2937, #0f1724); }
.article-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-body { padding: 16px 16px 18px; display: grid; gap: 10px; }
.article-tags { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.article-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(158,197,255,0.12);
  color: var(--accent);
}
.article-title { margin: 0; font-size: 18px; line-height: 1.25; }
.article-title a { color: inherit; text-decoration: none; }
.article-title a:hover { color: var(--accent); }
.article-excerpt { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.article-meta { display: flex; align-items: center; gap: 10px; color: #9fb3cc; font-size: 13px; }
.article-meta i { color: var(--accent); }

.articles-pagination { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 6px; }
.pager {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}
.pager:hover { border-color: rgba(158,197,255,0.6); }
.pager.is-active { background: var(--accent); color: #0c1118; border-color: transparent; }
.pager:disabled { opacity: .4; cursor: not-allowed; }

/* Article Content Spacing */
.article-card p,
main.articles-layout p { 
  margin: 0 0 8px 0;
  line-height: 1.6;
}
.article-card h1,
.article-card h2,
.article-card h3,
main.articles-layout h1,
main.articles-layout h2,
main.articles-layout h3 { 
  margin: 12px 0 8px 0;
  line-height: 1.3;
}

/* Article Detail View */
#article-detail {
  padding: 26px 5vw 46px;
}
.article-header {
  margin-bottom: 32px;
}
.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 16px;
  padding: 0;
  transition: color 0.2s;
}
.back-btn:hover {
  color: #fff;
}
.article-header h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;
}
.article-meta-detail {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.article-featured {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  margin: 24px 0 32px;
  box-shadow: 0 18px 35px rgba(0,0,0,0.28);
}
.article-featured img {
  width: 100%;
  height: auto;
  display: block;
}
.article-content {
  font-size: 16px;
  line-height: 1.7;
}
.article-content h2 {
  margin: 24px 0 12px;
  font-size: 24px;
}
.article-content h3 {
  margin: 18px 0 10px;
  font-size: 20px;
}
.article-content strong {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 640px) {
  .articles-hero { padding: 40px 18px 28px; }
  .articles-layout { padding: 22px 18px 40px; }
  #article-detail { padding: 22px 18px 40px; }
}
