/* ============================================================
   Simple Scott Learns — Dark Industrial Theme
   Palette drawn from logo: deep navy, warm gold, steel grays
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Core darks */
  --bg:           #0e1117;
  --bg-mid:       #151b26;
  --bg-card:      #1a2235;
  --bg-raised:    #1f2a3d;
  --border:       #2a3750;
  --border-light: #334466;

  /* Logo navy */
  --navy:         #0f1f3d;
  --navy-mid:     #162847;
  --navy-soft:    #1e3460;

  /* Logo gold */
  --gold:         #c8973a;
  --gold-lt:      #e8b96a;
  --gold-pale:    #f5e0b0;
  --gold-bg:      #1e1608;

  /* Text */
  --text-primary:   #e8edf5;
  --text-secondary: #9aaabf;
  --text-muted:     #566880;

  /* Steel accents */
  --steel:        #3a4f6a;
  --steel-lt:     #4a6280;

  /* Status */
  --green-bg:     #0d1f12;
  --green-border: #1e4d28;
  --green-text:   #4caf72;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --glow-gold:  0 0 20px rgba(200,151,58,0.15);

  --nav-h: 64px;
  --sidebar-w: 240px;
  --content-max: 820px;
  --gap: 32px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg-mid);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* Brand */
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}
.nav-links a:hover {
  background: var(--bg-raised);
  color: var(--text-primary);
  border-color: var(--border);
}
.nav-links a.active {
  background: var(--gold-bg);
  color: var(--gold);
  border-color: var(--gold);
}

.nav-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 14px;
}

.nav-social {
  display: flex;
  gap: 8px;
}
.nav-social a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.nav-social a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-bg);
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  background: var(--bg-mid);
  padding: 52px 40px 44px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

/* Industrial grid texture overlay */
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,151,58,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,151,58,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt), transparent 70%);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-primary);
  line-height: 1.15;
  max-width: var(--content-max);
  position: relative;
}
.page-header p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 300;
  max-width: 560px;
  position: relative;
}

/* ── Layout ─────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap);
  max-width: calc(var(--content-max) + var(--sidebar-w) + var(--gap) + 80px);
  margin: 0 auto;
  padding: 36px 40px 80px;
  align-items: start;
}

.main-content { min-width: 0; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* ── Tags ───────────────────────────────────────────────────── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 500;
  background: var(--bg-raised);
  color: var(--text-muted);
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.03em;
}
.tag:hover,
.tag.active {
  background: var(--gold-bg);
  color: var(--gold);
  border-color: var(--gold);
}
.tag .tag-count {
  margin-left: 5px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
}
.tag.active .tag-count { color: var(--gold); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-md), var(--glow-gold);
  border-color: var(--steel-lt);
  transform: translateY(-1px);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* ── Section label ──────────────────────────────────────────── */
.section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200,151,58,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Filter banner ──────────────────────────────────────────── */
.filter-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--gold-bg);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--gold);
  font-weight: 500;
}
.filter-banner.visible { display: flex; }
.filter-banner button {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
}

/* ── No results ─────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.clear-filter {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 20px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.clear-filter:hover { opacity: 0.85; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--steel); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 24px 20px 60px;
  }
  .sidebar { position: static; }
  .page-header { padding: 36px 20px 32px; }
  .page-header h1 { font-size: 1.9rem; }
  .site-nav { padding: 0 16px; }
  .nav-brand-sub { display: none; }
}

/* ── Utility ────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}