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

:root {
  --black:    #0a0a08;
  --off-white:#f0ede6;
  --cream:    #e8e3d8;
  --wolf-red: #c0392b;
  --wolf-red-dim: #8b2119;
  --muted:    #6b6860;
  --border:   rgba(240,237,230,0.12);
  --font-display: 'Bebas Neue', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --font-body:    'DM Sans', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ───── Noise overlay ───── */
.noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
}

/* ───── Header ───── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,8,0.85);
  backdrop-filter: blur(12px);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--off-white);
  text-decoration: none;
}
.site-logo:hover { color: var(--wolf-red); }

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--off-white); }
.site-nav a.active { border-bottom: 1px solid var(--wolf-red); padding-bottom: 2px; }

/* ───── Hero ───── */
.main { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 2rem 4rem; }

.hero { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; }

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--wolf-red);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--off-white);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 480px;
  line-height: 1.6;
}

/* ───── Layout ───── */
.layout { display: grid; grid-template-columns: 180px 1fr; gap: 3rem; align-items: start; }

@media (max-width: 680px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: flex; flex-wrap: wrap; gap: 8px; }
  .filter-block { margin-bottom: 0; }
}

/* ───── Sidebar ───── */
.sidebar { position: sticky; top: 80px; }

.filter-block { margin-bottom: 2rem; }

.filter-heading {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.filter-btn {
  display: block; width: 100%;
  text-align: left;
  background: none; border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.35rem 0;
  cursor: pointer;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: 2px;
}
.filter-btn:hover { color: var(--off-white); }
.filter-btn.active { color: var(--off-white); border-left-color: var(--wolf-red); }

.stat-row {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.25rem 0;
  line-height: 1.6;
}
.stat-row span { color: var(--off-white); }

/* ───── Feed ───── */
.feed { display: flex; flex-direction: column; gap: 0; }

.flash-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.35s ease both;
  transition: opacity 0.25s;
}
.flash-card.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 0.6rem;
}

.flash-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 500;
}
.tag-thought  { background: rgba(192,57,43,0.15); color: #e06b5f; }
.tag-news     { background: rgba(52,152,219,0.12); color: #5fa8d3; }
.tag-update   { background: rgba(39,174,96,0.12);  color: #5dbf8a; }
.tag-link     { background: rgba(155,89,182,0.12); color: #a87dc9; }

.flash-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.flash-body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--off-white);
  font-weight: 300;
  max-width: 640px;
  word-break: break-word;
}

.flash-body a { color: var(--wolf-red); text-decoration: underline; text-underline-offset: 3px; }
.flash-body a:hover { color: #e06b5f; }

.flash-actions {
  margin-top: 0.75rem;
  display: flex; gap: 1rem;
}

.action-btn {
  background: none; border: none;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  padding: 0;
  transition: color 0.15s;
  display: flex; align-items: center; gap: 5px;
}
.action-btn:hover { color: var(--off-white); }
.action-btn svg { width: 13px; height: 13px; }

.flash-card.new-flash { border-left: 2px solid var(--wolf-red); padding-left: 1rem; }

/* ───── Empty state ───── */
.feed-empty {
  padding: 3rem 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ───── Admin bar ───── */
.admin-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(14,13,11,0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  padding: 1rem 2rem;
}

#flash-form {
  max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
}

#flash-form select {
  width: fit-content;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 2px;
  cursor: pointer;
  outline: none;
}

#flash-form textarea {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 10px 12px;
  resize: none;
  height: 70px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
#flash-form textarea:focus { border-color: rgba(240,237,230,0.3); }
#flash-form textarea::placeholder { color: var(--muted); }

.admin-bar-footer {
  display: flex; align-items: center; justify-content: space-between;
}

.char-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.post-btn {
  background: var(--wolf-red);
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 7px 22px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s;
}
.post-btn:hover { background: var(--wolf-red-dim); }

/* body padding when admin bar is visible */
body.has-admin-bar { padding-bottom: 160px; }
