/* ============================================
   TOKENS — mirror portfolio
============================================ */
:root {
  --bg:          #080808;
  --bg-alt:      #0d0d0d;
  --panel:       #101010;
  --border:      #262626;
  --border-soft: #181818;
  --text:        #f0f0ee;
  --text-dim:    #a0a09e;
  --text-faint:  #666664;
  --accent:      #c9d94a;
  --accent-dim:  #7d8a30;
  --accent-glow: rgba(201, 217, 74, 0.08);
  --mono:        'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius:      4px;
  --sidebar-w:   220px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================
   BACKGROUND GRID
============================================ */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}

/* ============================================
   SIDEBAR
============================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  z-index: 100;
  background: rgba(8,8,8,0.97);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 52px;
}
.logo .prompt { color: var(--accent); }
.logo .dim    { color: var(--text-dim); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-link {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 10px 14px;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-left-color: var(--border);
}
.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-glow);
  border-left-color: var(--accent);
}

.sidebar-button {
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 4px;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.sidebar-footer-label {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.sidebar-social { display: flex; gap: 10px; }

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  transition: all 0.18s ease;
}
.social-icon svg { width: 16px; height: 16px; fill: currentColor; }
.social-icon:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

/* ============================================
   MAIN
============================================ */
.news-main {
  position: relative;
  z-index: 1;
  margin-left: var(--sidebar-w);
  padding: 80px 48px 80px;
  max-width: calc(var(--sidebar-w) + 1100px);
}

/* ============================================
   HEADER
============================================ */
.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent-dim);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.page-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.cursor {
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.page-sub {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 36px;
}

/* ============================================
   FILTERS
============================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  transition: all 0.15s ease;
}
.filter-btn:hover {
  color: var(--text-dim);
  border-color: var(--border);
  background: rgba(255,255,255,0.03);
}
.filter-btn.active {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

/* ============================================
   STATUS BAR
============================================ */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 32px;
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel);
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
  flex-shrink: 0;
}
.status-bar.error .status-dot { background: #e05c5c; animation: none; }
.status-bar.error { color: #e05c5c; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ============================================
   NEWS GRID
============================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* ── SKELETON CARDS ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.news-card-skeleton {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skel-line {
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
}
.skel-line.w-40 { width: 40%; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-80 { width: 80%; }
.skel-line.w-100 { width: 100%; }
.skel-line.h-16 { height: 16px; }
.skel-line.h-8  { height: 8px; }

/* ── REAL CARDS ── */
.news-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.news-card:hover {
  border-color: var(--border);
  background: rgba(255,255,255,0.015);
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.news-source {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--accent-dim);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.news-date {
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.news-read-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  transition: color 0.15s ease;
}
.news-card:hover .news-read-link { color: var(--accent); }

.news-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  display: block;
  order: -1;
}

/* ============================================
   LOAD MORE
============================================ */
.load-more-wrap { text-align: center; padding: 8px 0 40px; }

.load-more-btn {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 24px;
  transition: all 0.15s ease;
}
.load-more-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

/* ============================================
   ERROR STATE
============================================ */
.news-error {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel);
}
.news-error p {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 8px;
}

/* ============================================
   FOCUS
============================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .status-dot { animation: none; }
  * { transition: none !important; }
}
