/* ============================================================
   CapybaraNet — style.css
   Full stylesheet for the resource library
   ============================================================ */

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

:root {
  --bg:           #fafaf8;
  --surface:      #ffffff;
  --border:       rgba(0,0,0,0.10);
  --border-mid:   rgba(0,0,0,0.18);
  --text:         #1a1a18;
  --muted:        #6b6b67;
  --hint:         #9a9a95;

  --teal:         #1D9E75;
  --teal-light:   #E1F5EE;
  --teal-dark:    #085041;
  --red:          #D85A30;
  --red-light:    #FAECE7;
  --blue:         #185FA5;
  --blue-light:   #E6F1FB;
  --amber:        #BA7517;
  --amber-light:  #FAEEDA;
  --purple:       #534AB7;
  --purple-light: #EEEDFE;
  --gray-light:   #F1EFE8;
  --gray-dark:    #5F5E5A;

  --radius:       10px;
  --radius-lg:    14px;
  --font:         'DM Sans', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ─────────────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 52px;
}

.nav-brand {
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.nav-brand span { color: var(--teal); }

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0;
  margin-left: auto;
  list-style: none;
  overflow-x: auto;
}

.nav-links a {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.nav-links a:hover {
  background: var(--gray-light);
  color: var(--text);
}


header { border: none; }

/* ── HERO ────────────────────────────────────────────────── */

.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
}

.hero-logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
  display: block;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 15px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.8;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 0.5px solid var(--border-mid);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.toc a {
  font-size: 12px;
  color: var(--muted);
  padding: 5px 13px;
  border: 0.5px solid var(--border-mid);
  border-radius: 20px;
  transition: all 0.12s;
}

.toc a:hover {
  background: var(--surface);
  color: var(--text);
}

/* ── MAIN LAYOUT ─────────────────────────────────────────── */

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── SECTIONS ────────────────────────────────────────────── */

.section { margin-bottom: 3.5rem; }

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 0.5px solid var(--border);
}

.section-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.section-title { font-size: 17px; font-weight: 500; margin-bottom: 2px; }
.section-desc  { font-size: 12px; color: var(--muted); }

/* Icon colour variants */
.si-teal   { background: var(--teal-light);   color: var(--teal-dark); }
.si-blue   { background: var(--blue-light);   color: var(--blue); }
.si-red    { background: var(--red-light);    color: var(--red); }
.si-amber  { background: var(--amber-light);  color: var(--amber); }
.si-purple { background: var(--purple-light); color: var(--purple); }
.si-gray   { background: var(--gray-light);   color: var(--gray-dark); }

/* ── CARDS ───────────────────────────────────────────────── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--border-mid);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-name { font-size: 14px; font-weight: 500; }
.card-name a:hover { color: var(--teal); }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.65; }

/* ── BADGES ──────────────────────────────────────────────── */

.badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-gold      { background: var(--amber-light);  color: var(--amber); }
.badge-key       { background: var(--teal-light);   color: var(--teal-dark); }
.badge-ifcn      { background: var(--blue-light);   color: var(--blue); }
.badge-tool      { background: var(--purple-light); color: var(--purple); }
.badge-acad      { background: var(--gray-light);   color: var(--gray-dark); }
.badge-warn      { background: var(--red-light);    color: var(--red); }
.badge-indicted  { background: #FCEBEB;             color: #A32D2D; }
.badge-sanctioned{ background: var(--red-light);    color: var(--red); }
.badge-attributed{ background: var(--amber-light);  color: var(--amber); }

/* ── SKILL LIST ──────────────────────────────────────────── */

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 9px;
}

.skill-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.skill-item:hover { border-color: var(--border-mid); }

.skill-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.skill-name { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.skill-desc { font-size: 11px; color: var(--muted); line-height: 1.55; }

.skill-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--teal);
  margin-top: 4px;
}

.skill-link:hover { text-decoration: underline; }

/* ── BAD ACTORS ──────────────────────────────────────────── */

.actor-disclaimer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--amber-light);
  border: 0.5px solid rgba(186,117,23,0.25);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 12px;
  color: #5a3d08;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.actor-disclaimer strong { font-weight: 500; }

.actor-group { margin-bottom: 2rem; }

.actor-group-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 0.9rem;
}

.card-threat { border-left: 2px solid var(--red-light); }
.card-threat:hover { border-left-color: var(--red); }

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid var(--border);
}

.card-links a { font-size: 11px; color: var(--teal); }
.card-links a:hover { text-decoration: underline; }

/* ── BADBOX TIMELINE ─────────────────────────────────────── */

.badbox-timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: 2rem;
}

.badbox-timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--border-mid);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  flex-shrink: 0;
}

.tl-amber  { background: var(--amber); }
.tl-red    { background: var(--red); }
.tl-blue   { background: var(--blue); }
.tl-purple { background: var(--purple); }

.timeline-content {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  flex: 1;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.timeline-content:hover {
  border-color: var(--border-mid);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.timeline-date {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.timeline-title { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.timeline-desc  { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 8px; }

.tl-link { font-size: 11px; color: var(--teal); }
.tl-link:hover { text-decoration: underline; }

/* ── BADBOX CAPABILITIES ─────────────────────────────────── */

.badbox-what { margin-bottom: 1.75rem; }

.badbox-what-title,
.badbox-protect-title,
.badbox-sources-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

.badbox-caps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
}

.badbox-cap {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.15s;
}

.badbox-cap:hover { border-color: var(--border-mid); }

.badbox-cap-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 8px;
}

.badbox-cap-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.badbox-cap-desc { font-size: 11px; color: var(--muted); line-height: 1.6; }

/* ── BADBOX PROTECTION BOX ───────────────────────────────── */

.badbox-protect {
  background: var(--red-light);
  border: 0.5px solid rgba(216,90,48,0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.badbox-protect-title { color: var(--red); margin-bottom: 1rem; }

.badbox-protect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.badbox-protect-item {
  font-size: 12px;
  color: #6b2a10;
  line-height: 1.65;
  padding-left: 14px;
  position: relative;
}

.badbox-protect-item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--red);
}

.badbox-protect-item strong { font-weight: 500; }

.badbox-sources-title { margin-bottom: 0.9rem; }

/* ── FOOTER ──────────────────────────────────────────────── */

footer {
  border-top: 0.5px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 12px;
  color: var(--hint);
}

footer a { color: var(--teal); }

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 600px) {
  nav { padding: 0 1rem; }
  .hero, main { padding-left: 1rem; padding-right: 1rem; }
  .hero { padding-top: 2.5rem; }
  .nav-links { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
  .badbox-caps-grid { grid-template-columns: 1fr; }
  .badbox-protect-grid { grid-template-columns: 1fr; }
}
