:root {
  --bg: #0e0e10;
  --bg-elev: #16161a;
  --bg-card: #1a1a1f;
  --border: #26262d;
  --text: #f5f5f7;
  --text-muted: #9a9aa3;
  --accent: #e10600;
  --accent-2: #ff1a1a;
  --gold: #ffd166;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4, h5, h6, .display-1, .display-3, .display-5 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.text-secondary { color: var(--text-muted) !important; }
.bg-elev { background: var(--bg-elev); }

/* ===== Header ===== */
.site-header {
  background: rgba(14,14,16,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1030;
}
.site-header .navbar { padding: 14px 0; }
.site-header .navbar-brand { color: var(--text); font-weight: 700; }
.site-header .logo { filter: invert(1) brightness(1.1); }
.brand-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-left: 1px solid var(--border);
  padding-left: 12px;
  margin-left: 6px;
  color: var(--text-muted);
}
.navbar-toggler {
  border: 1px solid var(--border);
}
.navbar-toggler-icon {
  filter: invert(1);
}
.site-header .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.93rem;
  padding: 8px 12px !important;
  transition: color .15s;
}
.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--text);
}

/* ===== Buttons ===== */
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 8px 18px;
  transition: all .15s;
}
.btn-accent:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  transform: translateY(-1px);
}
.btn-accent.btn-lg { padding: 12px 26px; }
.btn-outline-light { border-radius: 999px; }

/* ===== Hero featured ===== */
.hero-featured { padding: 32px 0 0; }
.hero-card {
  position: relative;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  min-height: 480px;
  background-color: var(--bg-card);
  color: var(--text);
  isolation: isolate;
}
.hero-card-bg {
  position: absolute; inset: 0;
  background-image: var(--cover, none);
  background-size: cover; background-position: center;
  transition: transform .8s ease;
}
.hero-card:hover .hero-card-bg { transform: scale(1.04); }
.hero-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,14,16,0.96) 0%, rgba(14,14,16,0.5) 50%, rgba(14,14,16,0.1) 100%);
}
.hero-card-body {
  position: relative; z-index: 2;
  padding: 48px 40px;
  max-width: 820px;
  margin-top: auto;
  position: absolute; bottom: 0; left: 0; right: 0;
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 14px;
}
.hero-excerpt {
  font-size: 1.05rem;
  color: rgba(245,245,247,0.85);
  max-width: 700px;
  margin-bottom: 18px;
}
.hero-meta {
  color: rgba(245,245,247,0.75);
  font-size: 0.88rem;
  font-weight: 500;
}
.hero-meta .dot { margin: 0 8px; }

/* ===== Badges ===== */
.badge-cat {
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 4px;
}
.badge-cat-floating {
  position: absolute; top: 14px; left: 14px;
  background: var(--accent); color: #fff;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 4px;
  z-index: 2;
}

/* ===== Section titles ===== */
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 4px; background: var(--accent); border-radius: 2px;
}
.section-sub { font-size: 0.95rem; }

.kicker {
  display: inline-block;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ===== Article cards ===== */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.article-card:hover {
  transform: translateY(-3px);
  border-color: #38383f;
}
.article-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #2a2a32, #16161a);
  background-size: cover; background-position: center;
}
.cover-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--border); font-size: 3rem;
}
.article-card-title {
  font-size: 1.18rem; line-height: 1.3;
  margin: 0 0 10px;
}
.article-card-title a { color: var(--text); }
.article-card-title a:hover { color: var(--accent); }
.article-card-excerpt {
  color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px;
}
.article-card-meta {
  color: var(--text-muted); font-size: 0.82rem;
}

/* ===== Article page ===== */
.article-header {
  position: relative;
  min-height: 420px;
  padding: 120px 0 60px;
  background-image: var(--cover, none);
  background-size: cover; background-position: center;
  background-color: #18181d;
}
.article-header-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(14,14,16,0.55), rgba(14,14,16,0.92) 90%);
}
.article-header-inner { position: relative; z-index: 2; }
.article-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  max-width: 900px;
  margin-bottom: 18px;
}
.article-lead {
  font-size: 1.15rem; color: rgba(245,245,247,0.85);
  max-width: 800px; margin-bottom: 18px;
}
.article-meta {
  display: flex; gap: 20px; flex-wrap: wrap;
  color: var(--text-muted); font-size: 0.9rem;
}
.article-meta i { margin-right: 6px; color: var(--accent); }

.article-content {
  font-size: 1.08rem; line-height: 1.75; color: #d5d5da;
}
.article-content h2 { font-size: 1.7rem; margin: 2em 0 0.5em; }
.article-content h3 { font-size: 1.3rem; margin: 1.6em 0 0.4em; }
.article-content p { margin-bottom: 1.1em; }
.article-content a { color: var(--accent-2); text-decoration: underline; }
.article-content img {
  max-width: 100%; height: auto;
  border-radius: 12px;
  margin: 1.5em auto;
  display: block;
}
.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 6px 0 6px 20px;
  font-style: italic;
  color: #e8e8ec;
  margin: 1.5em 0;
}
.article-content ul, .article-content ol { padding-left: 1.4em; margin-bottom: 1.1em; }
.article-content code {
  background: var(--bg-card);
  padding: 2px 6px; border-radius: 4px;
  font-size: 0.92em;
}
.article-content iframe {
  max-width: 100%;
  aspect-ratio: 16/9;
  width: 100%;
  border: 0;
  border-radius: 12px;
  margin: 1.5em 0;
}

/* ===== Page hero (category etc) ===== */
.page-hero {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #16161a 0%, var(--bg) 100%);
}
.page-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
}

/* ===== Subscribe CTA ===== */
.subscribe-cta { padding: 60px 0; }
.subscribe-card {
  background: linear-gradient(135deg, #1a1a1f 0%, #20202a 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.subscribe-card::before {
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(225,6,0,0.25), transparent 70%);
  pointer-events: none;
}
.subscribe-form { display: flex; gap: 10px; position: relative; z-index: 1; }
.subscribe-form input { flex: 1; }
@media (max-width: 768px) {
  .subscribe-card { grid-template-columns: 1fr; padding: 28px; }
  .subscribe-form { flex-direction: column; }
}

/* ===== Forms ===== */
.form-control, .form-select {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
}
.form-control:focus, .form-select:focus {
  background: var(--bg-elev);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(225,6,0,0.15);
}
.form-control::placeholder { color: #6c6c75; }
.form-label { color: var(--text); font-weight: 500; }

.newsletter-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* ===== Footer ===== */
.site-footer {
  background: #0a0a0c;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer-brand {
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}
.footer-brand img { filter: invert(1) brightness(1.1); }
.footer-heading {
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-link {
  color: var(--text-muted);
  display: inline-block;
  padding: 4px 0;
  font-size: 0.92rem;
}
.footer-link:hover { color: var(--accent); }

/* ===== Pagination ===== */
.pagination .page-link {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  margin: 0 3px;
  border-radius: 8px;
}
.pagination .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
}
.pagination .page-link:hover {
  background: var(--bg-elev);
  color: var(--text);
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; opacity: 0.4; display: block; margin-bottom: 12px; }

/* ===== Alerts ===== */
.alert {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 12px;
}
.alert-success { border-left: 4px solid #19a974; }
.alert-danger { border-left: 4px solid var(--accent); }
.alert-info { border-left: 4px solid #2b8df5; }
.btn-close { filter: invert(1) brightness(1.2); }
