@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #08080d;
  --surface: #111118;
  --surface-2: #18181f;
  --surface-hover: #1e1e28;
  --border: #25253a;
  --border-hover: #3a3a55;
  --text: #d8d8e8;
  --text-bright: #f0f0fa;
  --text-muted: #7a7a96;
  --accent: #7c6df0;
  --accent-dim: rgba(124,109,240,0.12);
  --gold: #d4a843;
  --gold-dim: rgba(212,168,67,0.12);
  --green: #4ade80;
  --green-dim: rgba(74,222,128,0.12);
  --pink: #ec4899;
  --pink-dim: rgba(236,72,153,0.12);
  --blue: #38bdf8;
  --red: #f87171;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 16px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(124,109,240,0.04), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(212,168,67,0.03), transparent 50%);
  pointer-events: none;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.container--narrow { max-width: 720px; }

/* ── NAV ── */
nav { padding: 18px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo { width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent), var(--gold)); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; }
.nav-title { font-family: var(--serif); font-size: 20px; color: var(--text-bright); }
.nav-title span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; padding: 6px 12px; border-radius: 6px; transition: all 0.2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text-bright); background: var(--surface-2); border: 1px solid var(--border); }
.nav-links a.ext { color: var(--accent); }

/* ── HERO ── */
.hero { padding: 72px 0 48px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text-muted); background: var(--surface); }
.hero-badge .dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero h1 { font-family: var(--serif); font-size: clamp(34px,5vw,52px); line-height: 1.15; margin: 20px 0 16px; color: var(--text-bright); }
.hero p { font-size: 17px; color: var(--text-muted); max-width: 580px; margin: 0 auto 28px; font-weight: 300; }
.hero-stats { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-val { font-family: var(--mono); font-size: 20px; color: var(--text-bright); }
.hero-stat-val.accent { color: var(--accent); }
.hero-stat-val.gold { color: var(--gold); }
.hero-stat-val.green { color: var(--green); }
.hero-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.2px; margin-top: 2px; }

/* ── TICKER ── */
.ticker { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 28px; margin-bottom: 48px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; overflow: hidden; position: relative; }
.ticker::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(124,109,240,0.03), rgba(212,168,67,0.03), rgba(124,109,240,0.03)); background-size: 200% 100%; animation: tickerShimmer 8s linear infinite; }
@keyframes tickerShimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.ticker-item { text-align: center; position: relative; z-index: 1; }
.ticker-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }
.ticker-value { font-family: var(--mono); font-size: 18px; color: var(--text-bright); }

/* ── SECTION BAR ── */
.section-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.section-bar h2 { font-family: var(--serif); font-size: 22px; color: var(--text-bright); }
.section-bar a { color: var(--text-muted); text-decoration: none; font-size: 13px; }
.section-bar a:hover { color: var(--accent); }

/* ── FILTER PILLS ── */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill { padding: 5px 14px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 12px; font-family: var(--sans); cursor: pointer; transition: all 0.2s; }
.filter-pill:hover { color: var(--text); border-color: var(--border-hover); }
.filter-pill.active { color: var(--text-bright); background: var(--surface-2); border-color: var(--accent); }

/* ── FEATURED ── */
.featured { margin-bottom: 56px; }
.featured-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; min-height: 380px; transition: border-color 0.3s, box-shadow 0.3s; cursor: pointer; }
.featured-card:hover { border-color: var(--accent); box-shadow: 0 0 40px rgba(124,109,240,0.06); }
.featured-img { background: linear-gradient(135deg, #13082a, #0d1a2d, #0a1a15); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.featured-img-inner { width: 180px; height: 180px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--gold)); opacity: 0.5; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; color: rgba(255,255,255,0.7); letter-spacing: 6px; }
.featured-body { padding: 44px 36px; display: flex; flex-direction: column; justify-content: center; }
.featured-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.featured-body h2 { font-family: var(--serif); font-size: 26px; margin-bottom: 14px; line-height: 1.3; color: var(--text-bright); }
.featured-body p { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; font-weight: 300; }
.featured-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.featured-meta .author { color: var(--accent); font-weight: 500; }
.read-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 500; margin-top: 16px; transition: gap 0.2s; }
.read-link:hover { gap: 10px; }

/* ── ARTICLE GRID ── */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin-bottom: 56px; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.3s; cursor: pointer; text-decoration: none; display: block; }
.article-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.article-card.hidden { display: none; }
.article-thumb { height: 160px; position: relative; overflow: hidden; }
.article-thumb.market { background: linear-gradient(135deg, #0a1f12, #111118); }
.article-thumb.history { background: linear-gradient(135deg, #1f150a, #111118); }
.article-thumb.artist { background: linear-gradient(135deg, #0a1120, #111118); }
.article-thumb.community { background: linear-gradient(135deg, #1a0a20, #111118); }
.article-cat { position: absolute; top: 14px; left: 14px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; padding: 3px 9px; border-radius: 4px; font-weight: 600; }
.cat-market { background: var(--green-dim); color: var(--green); }
.cat-history { background: var(--gold-dim); color: var(--gold); }
.cat-artist { background: var(--accent-dim); color: var(--accent); }
.cat-community { background: var(--pink-dim); color: var(--pink); }
.article-body { padding: 20px; }
.article-body h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; color: var(--text-bright); }
.article-body p { color: var(--text-muted); font-size: 13px; font-weight: 300; line-height: 1.6; margin-bottom: 14px; }
.article-footer { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.article-footer .read-time { font-family: var(--mono); }

/* ── ARTICLE PAGE ── */
.article-page { padding: 60px 0 80px; }
.article-page .article-category { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; margin-bottom: 16px; padding: 4px 12px; border-radius: 4px; }
.article-page .article-title { font-family: var(--serif); font-size: clamp(32px,5vw,48px); line-height: 1.2; color: var(--text-bright); margin-bottom: 20px; }
.article-page .article-subtitle { font-size: 20px; color: var(--text-muted); font-weight: 300; line-height: 1.5; margin-bottom: 24px; }
.article-page .article-byline { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-muted); padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--gold)); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; color: #fff; flex-shrink: 0; }
.author-name { color: var(--text-bright); font-weight: 500; }
.article-content { margin-top: 40px; }
.article-content h2 { font-family: var(--serif); font-size: 26px; color: var(--text-bright); margin: 48px 0 20px; line-height: 1.3; }
.article-content p { font-size: 17px; margin-bottom: 24px; color: var(--text); font-weight: 300; }
.article-content em { font-style: italic; color: var(--text-muted); }
.article-content strong { color: var(--text-bright); font-weight: 600; }
.pull-quote { margin: 48px 0; padding: 32px 0 32px 32px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 24px; font-style: italic; color: var(--text-bright); line-height: 1.5; }
.pull-quote cite { display: block; margin-top: 12px; font-family: var(--sans); font-size: 13px; font-style: normal; color: var(--text-muted); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; text-align: center; }
.stat-card .stat-val { font-family: var(--mono); font-size: 28px; color: var(--accent); margin-bottom: 4px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.info-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px 32px; margin: 40px 0; }
.info-box-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); font-weight: 600; margin-bottom: 12px; }
.info-box p { font-size: 15px; color: var(--text-muted); margin-bottom: 0; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 48px 0 32px; padding-top: 32px; border-top: 1px solid var(--border); }
.article-tags span { font-size: 12px; font-family: var(--mono); padding: 4px 12px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }

/* ── TOOLS GRID ── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: all 0.2s; cursor: pointer; text-decoration: none; display: block; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(124,109,240,0.08); }
.tool-icon { width: 40px; height: 40px; border-radius: 10px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.tool-icon.quant { background: var(--accent-dim); color: var(--accent); }
.tool-icon.community { background: var(--pink-dim); color: var(--pink); }
.tool-icon.map { background: var(--green-dim); color: var(--green); }
.tool-icon.charts { background: var(--gold-dim); color: var(--gold); }
.tool-icon.prices { background: rgba(56,189,248,0.12); color: var(--blue); }
.tool-icon.wiki { background: rgba(168,85,247,0.12); color: #a855f7; }
.tool-icon.media { background: rgba(251,146,60,0.12); color: #fb923c; }
.tool-name { font-size: 13px; font-weight: 500; color: var(--text-bright); margin-bottom: 2px; }
.tool-desc { font-size: 11px; color: var(--text-muted); }

/* ── NEWSLETTER ── */
.newsletter { text-align: center; padding: 56px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 56px; position: relative; overflow: hidden; }
.newsletter::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(124,109,240,0.04), transparent 70%); }
.newsletter h2 { font-family: var(--serif); font-size: 26px; color: var(--text-bright); margin-bottom: 8px; position: relative; }
.newsletter p { color: var(--text-muted); margin-bottom: 24px; font-weight: 300; font-size: 15px; position: relative; }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; position: relative; }
.newsletter-form input { flex: 1; padding: 11px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px; font-family: var(--sans); outline: none; transition: border-color 0.2s; }
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button { padding: 11px 22px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: var(--sans); transition: opacity 0.2s; white-space: nowrap; }
.newsletter-form button:hover { opacity: 0.85; }

/* ── CTA BOX ── */
.cta-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin-top: 48px; }
.cta-box h3 { font-family: var(--serif); font-size: 22px; color: var(--text-bright); margin-bottom: 8px; }
.cta-box p { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; font-weight: 300; }
.cta-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-links a { padding: 10px 20px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.cta-links a.primary { background: var(--accent); color: #fff; }
.cta-links a.primary:hover { opacity: 0.85; }
.cta-links a.secondary { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.cta-links a.secondary:hover { color: var(--text); border-color: var(--text-muted); }

/* ── PROGRESS BAR ── */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--gold)); z-index: 100; transition: width 0.1s linear; width: 0%; }

/* ── FOOTER ── */
footer { padding: 28px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; font-size: 13px; }
footer .foot-left { color: var(--text-muted); }
footer .foot-left a { color: var(--accent); text-decoration: none; }
footer .foot-links { display: flex; gap: 16px; }
footer .foot-links a { color: var(--text-muted); text-decoration: none; font-size: 12px; transition: color 0.2s; }
footer .foot-links a:hover { color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-img { min-height: 180px; }
  .featured-body { padding: 28px 20px; }
  .article-grid { grid-template-columns: 1fr; }
  .ticker { justify-content: center; }
  .newsletter-form { flex-direction: column; }
  .stat-row { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .pull-quote { font-size: 20px; }
}
