/* bahansen.us — shared stylesheet
   Design: security/intelligence brief aesthetic, dark technical theme with
   monospace accents, clean typography. */
:root {
  --bg: #0b1220;
  --bg-soft: #111a2e;
  --bg-card: #0f1830;
  --border: #1f2b47;
  --text: #e6eaf1;              /* comfortable off-white titles (not pure white) */
  --text-dim: #d0d7e2;          /* soft gray-white body — easy on the eyes */
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

/* Load the site fonts (Inter for body, JetBrains Mono for accents) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 16px;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  position: sticky; top: 0; z-index: 10;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}

/* Masthead logo banner (cream background to match the logo artwork) */
.masthead {
  background: #f0eee4;               /* cream, matches logo background */
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.masthead .container {
  display: flex; justify-content: center; align-items: center;
  max-width: 1180px;
}
.masthead img.logo {
  display: block;
  max-width: 640px;
  width: 100%;
  height: auto;
}
@media (max-width: 640px) {
  .masthead img.logo { max-width: 100%; }
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--text);
}
.brand .dot { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--text-dim); font-size: 0.95rem; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a.active { color: var(--text); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* Hero */
.hero { padding: 72px 0 48px; }
.hero .kicker {
  font-family: var(--mono); font-size: 0.8rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px;
}
.hero h1 {
  font-size: 2.6rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lede { font-size: 1.15rem; color: var(--text-dim); max-width: 640px; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 6px;
  font-weight: 600; font-size: 0.95rem; margin-top: 24px; margin-right: 12px;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--accent); color: #081021; }
.btn-primary:hover { background: #7dd3fc; text-decoration: none; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Sections */
.section { padding: 40px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.section .sub { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 28px; }

/* Cards / grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 18px; transition: border-color 0.15s ease; }
.card:hover { border-color: var(--accent); }
.card .date {
  font-family: var(--mono); font-size: 0.75rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.9rem; }
.card .threat { font-family: var(--mono); font-size: 0.8rem; font-weight: 700; margin-top: 10px; }

/* History / archive list */
.briefings-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.briefings-list .card { display: flex; flex-direction: column; }
.briefings-list .card h3 { flex-grow: 1; }
.briefings-list .card .mono.muted { margin-top: 8px; font-size: 0.8rem; }
.threat-critical { color: var(--danger); }
.threat-high { color: var(--warn); }
.threat-moderate { color: var(--ok); }
.threat-low { color: var(--ok); }

/* Latest briefing highlight */
.latest {
  background: var(--bg-card); border: 1px solid var(--accent); border-radius: 8px;
  padding: 24px; margin-bottom: 24px;
}
.latest .tag {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem;
  background: var(--accent); color: #081021; border-radius: 4px;
  padding: 3px 10px; font-weight: 700; letter-spacing: 1px; margin-bottom: 12px;
}
.latest h3 { font-size: 1.25rem; margin-bottom: 6px; }
.latest .meta { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 10px; }
.latest .excerpt { color: var(--text-dim); }

/* Briefing page */
.briefing-header { padding: 48px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.briefing-header .back { font-family: var(--mono); font-size: 0.85rem; color: var(--text-dim); margin-bottom: 18px; display: block; }
.briefing-header h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; }
.briefing-header .threat-line { font-family: var(--mono); font-size: 0.95rem; margin-bottom: 14px; }
.briefing-body { max-width: 960px; }
.briefing-body .brief {
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin-bottom: 28px;
  font-size: 1.02rem; color: var(--text);
}
.briefing-body h2 {
  font-size: 1.15rem; font-weight: 700; margin: 32px 0 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); letter-spacing: 0.5px;
}
.briefing-body .item { margin-bottom: 18px; }
.briefing-body .item h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--text); }
.briefing-body .item p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 4px; }
.briefing-body .item .label { color: var(--accent); font-family: var(--mono); font-size: 0.8rem; font-weight: 700; }

/* Normalized tier content (content/briefings raw format) */
.brief-summary {
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin-bottom: 28px;
  font-size: 1.02rem; color: var(--text);
}
.briefing-body h2.tier {
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent-2); font-family: var(--mono);
  margin: 44px 0 16px; padding: 10px 14px;
  border-left: 4px solid var(--accent);
  border-bottom: none;
  background: var(--bg-soft);
  border-radius: 0 6px 6px 0; line-height: 1.3;
}
.tier-item { margin-bottom: 18px; }
.tier-item h3 { font-size: 1.15rem; font-weight: 700; margin: 26px 0 6px; color: var(--text); font-family: var(--sans); line-height: 1.15; }
.tier-item p { color: var(--text-dim); font-size: 1rem; margin-bottom: 4px; line-height: 1.5; font-family: var(--sans); }
.tier-item .label { color: var(--accent); font-family: var(--mono); font-size: 0.8rem; font-weight: 700; }

/* Google-Docs merged export (what n8n pushes) — themed, not inline-styled */
.briefing-body .merged { font-family: var(--sans); }

/* Tier section headers (TIER 1/2/3) — big, distinct, uppercase section markers */
.briefing-body .merged p.title {
  font-size: 1.5rem;              /* large — the big section header */
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-2);         /* distinct indigo/violet — different from body */
  font-family: var(--mono);       /* technical mono for the section marker */
  margin: 44px 0 16px;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 6px 6px 0;
  line-height: 1.3;
}
.briefing-body .merged p.title span { color: inherit; }

.briefing-body .merged h1 {
  font-size: 1.15rem; font-weight: 700; margin: 26px 0 6px;
  color: var(--text); line-height: 1.15; font-family: var(--sans);
}
/* Tier 2 article titles are <h2> in the Google-Docs export — must match
   Tier 1's <h1> exactly so ALL article titles share one consistent style. */
.briefing-body .merged h2 {
  font-size: 1.15rem; font-weight: 700; margin: 26px 0 6px;
  color: var(--text); line-height: 1.15; font-family: var(--sans);
  padding-bottom: 0; border-bottom: none;
}
.briefing-body .merged p { margin: 0 0 10px; line-height: 1.5; color: var(--text-dim); font-family: var(--sans); }
.briefing-body .merged ul { padding-left: 20px; margin: 0 0 12px; list-style: none; }
.briefing-body .merged ul li {
  margin: 0 0 4px 18px; padding: 0; line-height: 1.5;
  color: var(--text-dim); font-size: 1rem; font-family: var(--sans);
}
/* Field labels inside merged <li> ("Why You Must Read This:", "Source:", etc.)
   — match the normalized pages' .tier-item .label accent-mono style. */
.briefing-body .merged ul li span:first-child {
  color: var(--accent); font-family: var(--mono);
  font-size: 0.8rem; font-weight: 700;
}
.briefing-body .merged a { color: var(--accent); text-decoration: underline; }

/* History page (month / week grouping) */
.history-month { margin-bottom: 36px; }
.history-month h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--border);
  font-family: var(--mono); letter-spacing: 0.5px;
}
.history-week { font-size: 0.95rem; color: var(--accent-2); margin: 18px 0 8px; font-family: var(--mono); }
.history-list { list-style: none; margin: 0; }
.history-list li { margin-bottom: 8px; padding-left: 8px; border-left: 2px solid var(--border); }
.history-list li:hover { border-left-color: var(--accent); }
.history-list .date { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); }
.history-list a { color: var(--text); }
.history-list a:hover { color: var(--accent); }
.history-list .threat { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 64px; padding: 28px 0;
  color: var(--text-dim); font-size: 0.85rem;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Misc */
.mono { font-family: var(--mono); }
.muted { color: var(--text-dim); }
.tag-list { list-style: none; margin: 20px 0 0; }
.tag-list li { margin-bottom: 10px; }
.tag-list .tag-label {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--accent);
  display: inline-block; min-width: 110px;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.9rem; }
  .nav { gap: 14px; }
  .nav a { font-size: 0.85rem; }
}
