/* ==========================================
   GCRflow Radar — Design System
   Print-industry precision meets modern web
   ========================================== */

:root {
  /* Colors - Inspired by CMYK + Dark UI */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a25;
  --bg-card-hover: #22222f;
  --bg-accent: #0d1117;
  
  --text-primary: #e8e8ed;
  --text-secondary: #8b8b9e;
  --text-muted: #5a5a6e;
  
  --accent-cyan: #00d4aa;
  --accent-cyan-dim: rgba(0, 212, 170, 0.15);
  --accent-magenta: #e84393;
  --accent-yellow: #fdcb6e;
  --accent-key: #2d2d3a;
  
  --border: #2a2a38;
  --border-light: #1e1e2a;
  
  /* Typography */
  --font-sans: 'DM Sans', 'Noto Sans SC', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --content-width: 760px;
  --page-width: 1100px;
  --nav-height: 64px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
  scroll-behavior: smooth; 
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

a { 
  color: var(--accent-cyan); 
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #33e8c0; }

img { max-width: 100%; height: auto; }

/* ==========================================
   Navigation
   ========================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  color: var(--accent-cyan);
  font-size: 20px;
}

.nav-logo-accent {
  color: var(--accent-cyan);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-cta {
  color: var(--accent-cyan) !important;
  border: 1px solid rgba(0, 212, 170, 0.3);
}
.nav-cta:hover {
  background: var(--accent-cyan-dim) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: 0.2s;
}

/* ==========================================
   Hero
   ========================================== */

.hero {
  padding: calc(var(--nav-height) + 60px) 24px 50px;
  text-align: center;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 20px;
  background: var(--accent-cyan-dim);
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
}

/* ==========================================
   Posts Grid
   ========================================== */

.posts-section {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 20px 24px 60px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 28px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-2px);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.post-card-tag {
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.post-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 10px;
}

.post-card-title a {
  color: var(--text-primary);
}
.post-card-title a:hover {
  color: var(--accent-cyan);
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}

.post-card-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-cyan);
}

/* ==========================================
   Article
   ========================================== */

.article-header {
  padding: calc(var(--nav-height) + 50px) 24px 40px;
  border-bottom: 1px solid var(--border-light);
}

.article-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.article-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-description {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-tag {
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}

/* Article Body */
.article-body-wrapper {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  gap: 60px;
}

.article-content {
  max-width: var(--content-width);
  flex: 1;
  min-width: 0;
}

/* TOC */
.article-toc {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 30px);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-height) - 60px);
  overflow-y: auto;
}

.toc-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc-link {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 0;
  border-left: 2px solid var(--border-light);
  padding-left: 12px;
  transition: all 0.2s;
}

.toc-link:hover {
  color: var(--text-primary);
  border-left-color: var(--accent-cyan);
}

.toc-sub {
  padding-left: 24px;
  font-size: 12px;
}

/* Article Content Typography */
.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.article-content h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 36px 0 12px;
}

.article-content p {
  margin-bottom: 18px;
  color: var(--text-primary);
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  margin-bottom: 18px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 3px solid var(--accent-cyan);
  background: var(--bg-card);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent-cyan);
}

.article-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
  overflow-x: auto;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.article-content th {
  background: var(--bg-card);
  font-weight: 600;
  text-align: left;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
}

.article-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
}

.article-content img {
  border-radius: 8px;
  margin: 24px 0;
  border: 1px solid var(--border-light);
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Article Footer */
.article-footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

.article-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 40px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-cta strong {
  color: var(--accent-cyan);
}

.article-nav {
  display: flex;
  gap: 20px;
}

.article-nav-link {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.2s;
}

.article-nav-link:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.article-nav-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.article-nav-title {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

.article-nav-link.next {
  text-align: right;
}

/* ==========================================
   CTA Section
   ========================================== */

.cta-section {
  padding: 0 24px 80px;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(232, 67, 147, 0.05) 100%);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 16px;
  padding: 48px 32px;
}

.cta-inner h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.cta-inner p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 15px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
}

.cta-btn:hover {
  background: #33e8c0;
  color: var(--bg-primary);
  transform: translateY(-1px);
}

/* ==========================================
   Pagination
   ========================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
}

.pagination-btn {
  color: var(--accent-cyan);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 6px;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: var(--accent-cyan-dim);
}

.pagination-info {
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================
   Footer
   ========================================== */

.footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-copy {
  width: 100%;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  margin-top: 10px;
}

.footer-copy p {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-meta {
  margin-top: 4px;
  font-size: 12px !important;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    flex-direction: column;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  
  .hero-title { font-size: 30px; }
  
  .posts-grid { grid-template-columns: 1fr; }
  
  .article-title { font-size: 28px; }
  .article-body-wrapper { flex-direction: column; }
  .article-toc { 
    width: 100%; 
    position: static; 
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  
  .article-nav { flex-direction: column; }
  .article-nav-link.next { text-align: left; }
  
  .footer-inner { flex-direction: column; text-align: center; }
}
