/* cctbp.com design system — dark technical research aesthetic */
:root {
  --bg: #0a0f1a;
  --bg-soft: #111827;
  --surface: #141f34;
  --border: #2a3854;
  --text: #f0f3f9;
  --text-muted: #aab6cc;
  --text-dim: #7c88a3;
  --accent: #60a5fa;
  --accent-bright: #a5c9ff;
  --accent-soft: rgba(96, 165, 250, 0.14);
  --pii: #f472b6;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.25);
  --shadow-lift: 0 4px 8px rgba(0,0,0,0.35), 0 16px 32px rgba(96,165,250,0.08);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  /* Type scale: 1.25 ratio steps */
  --fs-xs: 0.72rem;
  --fs-sm: 0.85rem;
  --fs-base: 1rem;
  --fs-md: 1.15rem;
  --fs-lg: 1.4rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.2rem;
  --fs-3xl: 2.75rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: rgba(96, 165, 250, 0.3); }

/* Header */
.site-header {
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-family: var(--mono); font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent-bright); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: all 0.18s;
  border: none;
  cursor: pointer;
}
.btn-sm { padding: 7px 14px; font-size: var(--fs-xs); }
.btn-primary { background: var(--accent); color: #0a0f1a; }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(96,165,250,0.35); }
.btn-secondary { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }
.btn-light { background: #fff; color: #0a0f1a; }
.btn-light:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,255,255,0.2); }

/* Hero */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.14) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 18px;
}
.headline {
  font-size: clamp(var(--fs-2xl), 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin-bottom: 20px;
}
.headline .hl-accent { color: var(--accent-bright); }
.subhead { font-size: var(--fs-md); color: var(--text-muted); max-width: 56ch; margin-bottom: 32px; line-height: 1.65; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Sections */
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.section-sub { color: var(--text-muted); max-width: 62ch; margin-bottom: 36px; line-height: 1.65; }

/* Pillar cards */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pillar-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.pillar-card .pillar-idx { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600; color: var(--accent-bright); letter-spacing: 0.12em; }
.pillar-card h3 { font-size: var(--fs-lg); font-weight: 700; }
.pillar-card p { color: var(--text-muted); font-size: var(--fs-sm); flex: 1; line-height: 1.6; }
.pillar-card .pillar-link { font-size: var(--fs-sm); color: var(--accent-bright); text-decoration: none; font-weight: 600; }
.pillar-card .pillar-link:hover { text-decoration: underline; }
.pillar-card--featured {
  background: linear-gradient(160deg, var(--surface) 0%, rgba(96,165,250,0.08) 100%);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}
.pillar-card--featured .pillar-idx { color: var(--pii); }

/* Blog cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.post-card .post-date { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); letter-spacing: 0.04em; }
.post-card h3 { font-size: var(--fs-md); line-height: 1.35; }
.post-card p { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; }
.post-card .post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.post-card .tag { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600; color: var(--accent-bright); background: var(--accent-soft); border: 1px solid rgba(96,165,250,0.25); padding: 4px 10px; border-radius: 20px; }

/* FlawedToken highlight */
.ft-banner {
  background: linear-gradient(135deg, rgba(96,165,250,0.14), rgba(244,114,182,0.09));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.ft-banner h3 { font-size: var(--fs-lg); margin-bottom: 8px; }
.ft-banner p { color: var(--text-muted); font-size: var(--fs-sm); max-width: 56ch; line-height: 1.6; }
.ft-banner .mono { font-family: var(--mono); font-size: var(--fs-sm); font-weight: 600; color: var(--pii); margin-top: 8px; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); line-height: 1.55; }
.data-table th { background: var(--bg-soft); color: var(--accent-bright); font-family: var(--mono); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.data-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--accent-soft); }
.data-table td.mono { font-family: var(--mono); font-size: var(--fs-sm); font-weight: 600; color: var(--accent-bright); }

/* Prose */
.prose { max-width: 74ch; }
.prose h1 { font-size: 2rem; margin-bottom: 14px; letter-spacing: -0.02em; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.prose h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose li { margin-bottom: 8px; }
.prose code { font-family: var(--mono); font-size: 0.85em; background: var(--accent-soft); color: var(--accent-bright); padding: 2px 6px; border-radius: 4px; }
.prose a { color: var(--accent-bright); }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 18px; margin: 20px 0; color: var(--text-muted); font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.prose pre { background: #0d1424; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; overflow-x: auto; margin: 18px 0; }
.prose pre code { background: none; padding: 0; color: #c9d7ee; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.9rem; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }

.mt-lg { margin-top: 32px; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin-top: 24px; }
.contact-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: var(--fs-sm);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}
.contact-input:focus { border-color: var(--accent); }
.contact-textarea { resize: vertical; font-family: var(--font); }
.contact-status { font-size: var(--fs-sm); min-height: 1.4em; }
.social-row { display: flex; gap: 20px; flex-wrap: wrap; }
.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color 0.15s;
}
.social-link:hover { color: var(--accent-bright); }
