/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
  --bg: #0a0d12;
  --bg-card: rgba(14, 18, 26, 0.95);
  --text: #e4e8ef;
  --muted: #8a94a6;
  --accent: rgba(74, 163, 255, 0.9);
  --accent-hover: rgba(94, 178, 255, 1);
  --border: rgba(34, 49, 73, 0.9);
  --danger: rgba(255, 120, 120, 0.6);
  --radius: 14px;
  --radius-sm: 10px;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.35em;
}

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

/* ========================================
   Utility Classes
   ======================================== */
.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.skeleton {
  color: var(--muted);
  padding: 2rem;
  text-align: center;
}

/* ========================================
   Layout
   ======================================== */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   Site Header
   ======================================== */
.site-header {
  background: rgba(9, 12, 18, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

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

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

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: 48px 0 32px;
  text-align: center;
}

.hero h1 {
  margin-bottom: 12px;
}

.hero .muted {
  font-size: 1.1rem;
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.post-card h3 {
  margin: 12px 0 8px;
}

.post-card h3 a {
  color: var(--text);
}

.post-card h3 a:hover {
  color: var(--accent);
}

.excerpt {
  color: var(--muted);
  margin: 0;
}

/* ========================================
   Post Meta & Badges
   ======================================== */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(34, 49, 73, 0.6);
  color: var(--muted);
}

.badge.accent {
  background: rgba(74, 163, 255, 0.15);
  color: var(--accent);
}

/* ========================================
   Controls & Filters
   ======================================== */
.controls {
  margin-bottom: 24px;
}

.controls-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========================================
   Form Elements
   ======================================== */
.input,
.select {
  background: rgba(9, 12, 18, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.12);
}

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

.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a94a6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.controls-row .input,
.controls-row .select {
  flex: 1;
  min-width: 150px;
}

/* ========================================
   Chips (Tag filters)
   ======================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  padding: 6px 14px;
  font-size: 0.9rem;
  border-radius: 999px;
  background: rgba(34, 49, 73, 0.5);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  user-select: none;
}

.chip:hover {
  background: rgba(34, 49, 73, 0.8);
  color: var(--text);
}

.chip.active {
  background: rgba(74, 163, 255, 0.2);
  color: var(--accent);
}

/* ========================================
   Buttons
   ======================================== */
.button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #000;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.button:hover {
  background: var(--accent-hover);
  color: #000;
}

.button:active {
  transform: scale(0.98);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.button.secondary:hover {
  background: rgba(74, 163, 255, 0.1);
  color: var(--accent-hover);
}

/* ========================================
   Posts List
   ======================================== */
.posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

/* ========================================
   Article Page
   ======================================== */
.article h1 {
  margin: 12px 0 8px;
}

.article .muted {
  margin-bottom: 24px;
}

.article .content {
  margin-top: 24px;
}

.article .content h2 {
  margin-top: 28px;
}

.article .content p {
  color: var(--text);
  line-height: 1.75;
}

.article .content ul {
  line-height: 1.75;
}

/* ========================================
   Share Section
   ======================================== */
.share-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.site-footer .muted {
  margin: 0;
  font-size: 0.9rem;
}

/* ========================================
   Video Blocks
   ======================================== */
.video-wrap {
  margin-top: 12px;
}

.vid-title {
  margin: 6px 0 8px;
  font-weight: 700;
  color: var(--text);
}

.vid-cap {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(9, 12, 18, 0.45);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-card {
  padding: 40px 20px;
  text-align: center;
  background: rgba(9, 12, 18, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ========================================
   Quote Blocks
   ======================================== */
.quote {
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  background: rgba(9, 12, 18, 0.35);
  border-radius: 12px;
}

.quote-by {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ========================================
   Callout Blocks
   ======================================== */
.callout {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(9, 12, 18, 0.35);
}

.callout-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.callout-text {
  color: var(--muted);
}

.callout-note {
  border-color: rgba(74, 163, 255, 0.6);
}

.callout-hot {
  border-color: var(--danger);
}

/* ========================================
   Sources Block
   ======================================== */
.sources {
  margin: 14px 0;
  padding: 14px;
  background: rgba(9, 12, 18, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sources h3 {
  margin: 0 0 10px;
}

.sources ul {
  margin: 0 0 0 18px;
}

.sources li {
  margin-bottom: 6px;
}

/* ========================================
   Image Blocks
   ======================================== */
.img {
  margin: 14px 0;
}

.img img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.img-cap {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .controls-row {
    flex-direction: column;
  }

  .controls-row .input,
  .controls-row .select {
    width: 100%;
  }
}
