/* ─────────────────────────────────────────────────────
   archive.css — shared styles for all archive pages
   ───────────────────────────────────────────────────── */

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

:root {
  --ink:    #0D0D0D;
  --paper:  #F7F3EC;
  --cream:  #EDE8DE;
  --warm:   #D4A853;
  --rust:   #C4522A;
  --sage:   #4A6741;
  --slate:  #3D4F5C;
  --muted:  #8A8278;
  --rule:   #C8BFB0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── ARCHIVE HEADER ─── */
.archive-header {
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 0 var(--rule);
}

.archive-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--rule);
}

.archive-wordmark {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
}

.archive-wordmark span {
  color: var(--rust);
  font-style: italic;
}

.archive-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* ─── SECTION NAV ─── */
.section-nav {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--rule);
}

.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.65rem 1.2rem;
  white-space: nowrap;
  border-right: 1px solid var(--rule);
  transition: background 0.15s, color 0.15s;
}

.section-nav a:first-child { border-left: 1px solid var(--rule); }

.section-nav a:hover {
  background: var(--ink);
  color: var(--paper);
}

.section-nav a.active {
  background: var(--rust);
  color: #fff;
}

/* ─── MAIN ─── */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ─── SECTION HERO ─── */
.section-hero {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}

.section-hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.section-hero p {
  font-size: 14px;
  color: var(--muted);
}

/* ─── FEED LIST (single-column stacked) ─── */
.feed-grid-3 {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--rule);
}

/* ─── ARCHIVE CARD ─── */
.feed-card {
  background: var(--paper);
  padding: 1.25rem 1.5rem;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  border-bottom: 1px solid var(--rule);
}

.feed-card:last-child { border-bottom: none; }

.feed-card:hover { background: var(--cream); }

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.status-badge {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
}

.status-active   { background: #D4EDDA; color: #2A6741; }
.status-archived { background: var(--cream); color: var(--muted); }

.feed-tag {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
}

.tag-tech    { background: var(--slate); color: #fff; }
.tag-world   { background: var(--sage);  color: #fff; }
.tag-finance { background: var(--rust);  color: #fff; }
.tag-science { background: #5C4A8A;      color: #fff; }
.tag-culture { background: var(--warm);  color: var(--ink); }

.score-badge {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  background: var(--rust);
  color: #fff;
  border-radius: 2px;
  margin-left: auto;
}

.card-headline {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.headline-link { text-decoration: none; color: inherit; }
.headline-link:hover .card-headline { color: var(--rust); }

.card-reasoning {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.card-blurb {
  font-size: 13px;
  color: #555;
  line-height: 1.55;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: auto;
}

.card-meta strong {
  color: var(--rust);
  font-weight: 500;
}

/* ─── BREADCRUMB ─── */
.archive-breadcrumb {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.archive-breadcrumb:hover { color: var(--rust); }

/* ─── ARCHIVE CARD (editorial layout) ─── */
.archive-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}
.archive-card:first-child { padding-top: 0; }
.archive-card:last-child  { border-bottom: none; }

.archive-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  margin-bottom: 1.25rem;
}

.archive-section-pill {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  margin-bottom: 0.65rem;
}

.archive-headline {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.archive-headline a {
  color: var(--ink);
  text-decoration: none;
}
.archive-headline a:hover { color: var(--rust); }

.archive-blurb {
  font-size: 14px;
  color: #444;
  line-height: 1.65;
  margin-bottom: 0.85rem;
}

.archive-meta {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.archive-meta strong { color: var(--rust); font-weight: 500; }

.archive-read-link {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.archive-read-link:hover {
  color: var(--rust);
  border-color: var(--rust);
}

/* ─── EMPTY STATE ─── */
.empty-state {
  padding: 3rem 2rem;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--paper);
  border: none;
}

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.6rem 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, background 0.15s;
  z-index: 200;
}

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover   { background: var(--rust); }

/* ─── FOOTER ─── */
footer {
  border-top: 3px solid var(--ink);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  background: var(--cream);
}

.footer-brand .brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--ink);
}

.footer-brand .brand-name span { color: var(--rust); font-style: italic; }

.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  font-size: 13px;
  color: var(--muted);
  padding: 0.2rem 0;
}

.footer-col ul li a {
  color: var(--muted);
  text-decoration: none;
}

.footer-col ul li a:hover { color: var(--rust); }

.footer-bottom {
  border-top: 1px solid var(--rule);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cream);
}

.footer-bottom p {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  footer { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .archive-topbar { padding: 0.75rem 1rem; }
  main            { padding: 1.5rem 1rem 3rem; }
}
