/* ============================================================
   BlackhawkHub.tech — Cybersecurity Portal
   Clean underground · dark · authoritative
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --base: #0A0E14;
  --surface: #0D1117;
  --elevated: #161B22;
  --elevated-2: #1C232E;
  --border: #222A35;
  --border-2: #30363D;
  --ink: #E6EDF3;
  --slate: #8B949E;
  --muted: #5C6672;
  /* accent: terminal green */
  --acc: #3FB950;
  --acc-dim: #2A6F38;
  --acc-soft: rgba(63,185,80,0.12);
  --cyan: #39D0D8;
  /* severity scale */
  --sev-critical: #F85149;
  --sev-high: #FF7B00;
  --sev-medium: #D29922;
  --sev-low: #3FB950;
  --sev-info: #58A6FF;
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --fm: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --fb: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--fb); background: var(--base); color: var(--ink); line-height: 1.6; font-size: 15.5px; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
code, kbd, pre { font-family: var(--fm); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--acc); color: #04130A; padding: 8px 14px; border-radius: 6px; z-index: 200; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.mono { font-family: var(--fm); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fm); font-weight: 500; font-size: 13.5px; padding: 10px 18px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; transition: transform .12s, border-color .12s, background .12s, box-shadow .12s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-acc { background: var(--acc); color: #04130A; font-weight: 600; }
.btn-acc:hover { box-shadow: 0 8px 24px rgba(63,185,80,.28); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }

/* Top ticker */
.ticker { background: var(--surface); border-bottom: 1px solid var(--border); overflow: hidden; }
.ticker-inner { display: flex; align-items: center; gap: 10px; padding: 7px 22px; max-width: var(--maxw); margin-inline: auto; font-family: var(--fm); font-size: 12px; color: var(--slate); }
.ticker-label { color: var(--acc); font-weight: 600; flex-shrink: 0; }
.ticker-feed { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-feed b { color: var(--ink); font-weight: 500; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(10,14,20,0.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--fm); font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand .accent { color: var(--acc); }
.nav { display: none; }
.nav ul { display: flex; gap: 6px; align-items: center; }
.nav a { color: var(--slate); font-family: var(--fm); font-size: 13.5px; font-weight: 500; padding: 8px 12px; border-radius: 6px; }
.nav a:hover { color: var(--ink); background: var(--elevated); text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
@media (min-width: 920px) { .nav { display: block; } .nav-toggle { display: none; } }
.mobile-nav { display: none; border-top: 1px solid var(--border); }
.mobile-nav.open { display: block; }
.mobile-nav ul { flex-direction: column; padding: 8px 0; }
.mobile-nav a { display: block; padding: 12px 22px; color: var(--slate); font-family: var(--fm); font-size: 14px; }
@media (min-width: 920px) { .mobile-nav { display: none !important; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 76px 64px; border-bottom: 1px solid var(--border); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 44px 44px; opacity: .15; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent 75%); pointer-events: none; }
.hero::after { content: ""; position: absolute; top: -20%; left: 50%; transform: translateX(-50%); width: 700px; height: 420px; background: radial-gradient(ellipse, rgba(63,185,80,.1), transparent 65%); pointer-events: none; }
.hero-inner { position: relative; max-width: 800px; }
.tagline { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fm); font-size: 12.5px; color: var(--acc); background: var(--acc-soft); border: 1px solid var(--acc-dim); border-radius: 6px; padding: 6px 13px; margin-bottom: 26px; }
.tagline .blink { width: 8px; height: 8px; background: var(--acc); border-radius: 1px; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 0%,50%{opacity:1} 50.01%,100%{opacity:.2} }
@media (prefers-reduced-motion: reduce){ .blink{ animation: none; } }
.hero h1 { font-family: var(--fb); font-size: clamp(34px, 6vw, 60px); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 18px; }
.hero h1 .acc { color: var(--acc); }
.hero p { font-size: clamp(15px, 2vw, 18px); color: var(--slate); max-width: 60ch; margin-bottom: 22px; }
.hero-prompt { font-family: var(--fm); font-size: 13px; color: var(--muted); margin-bottom: 30px; }
.hero-prompt .pmt { color: var(--acc); }
.hero-prompt .cmd { color: var(--ink); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--border); }
.hstat .n { font-family: var(--fm); font-size: 26px; font-weight: 700; color: var(--ink); }
.hstat .n .acc { color: var(--acc); }
.hstat .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* Section */
.section { padding-block: 64px; border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head .st { display: flex; align-items: center; gap: 10px; }
.section-head .st .hashtag { font-family: var(--fm); color: var(--acc); font-size: 22px; }
.section-head h2 { font-family: var(--fb); font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; letter-spacing: -0.01em; }
.section-head .more { font-family: var(--fm); font-size: 13px; font-weight: 500; }
.section-head p { color: var(--slate); font-size: 14.5px; margin-top: 4px; }

/* Vulnerability reports */
.vuln-list { display: flex; flex-direction: column; gap: 12px; }
.vuln { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; transition: border-color .15s, transform .15s; }
.vuln:hover { border-color: var(--border-2); transform: translateX(2px); }
.sev-badge { font-family: var(--fm); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 5px 10px; border-radius: 6px; text-align: center; min-width: 92px; }
.sev-badge .score { display: block; font-size: 15px; line-height: 1.1; }
.sev-critical { background: rgba(248,81,73,.14); color: var(--sev-critical); border: 1px solid rgba(248,81,73,.3); }
.sev-high { background: rgba(255,123,0,.13); color: var(--sev-high); border: 1px solid rgba(255,123,0,.3); }
.sev-medium { background: rgba(210,153,34,.13); color: var(--sev-medium); border: 1px solid rgba(210,153,34,.3); }
.sev-low { background: rgba(63,185,80,.13); color: var(--sev-low); border: 1px solid rgba(63,185,80,.3); }
.vuln-body h3 { font-family: var(--fb); font-size: 16px; font-weight: 600; margin-bottom: 5px; line-height: 1.3; }
.vuln-body h3 a { color: var(--ink); }
.vuln-body h3 a:hover { color: var(--acc); text-decoration: none; }
.vuln-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-family: var(--fm); font-size: 11.5px; color: var(--muted); }
.vuln-meta .cve { color: var(--cyan); }
.vuln-meta .tag { color: var(--slate); }
.vuln-affected { font-size: 12.5px; color: var(--slate); text-align: right; max-width: 180px; }
@media (max-width: 680px) {
  .vuln { grid-template-columns: auto 1fr; }
  .vuln-affected { display: none; }
}

/* Toolkits */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 600px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--acc-dim); transform: translateY(-3px); }
.tool-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tool-ic { width: 40px; height: 40px; border-radius: 9px; background: var(--elevated); border: 1px solid var(--border); display: grid; place-items: center; font-size: 19px; }
.tool-cat { font-family: var(--fm); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--elevated); border: 1px solid var(--border); padding: 4px 9px; border-radius: 5px; }
.tool h3 { font-family: var(--fm); font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.tool p { font-size: 13.5px; color: var(--slate); line-height: 1.55; margin-bottom: 14px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-tags span { font-family: var(--fm); font-size: 10.5px; color: var(--slate); background: var(--elevated); border-radius: 4px; padding: 3px 7px; }

/* Code block */
.codeblock { background: #06090F; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 6px 0; }
.codebar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.codebar .dot { width: 11px; height: 11px; border-radius: 50%; }
.codebar .r{background:#F85149}.codebar .y{background:#D29922}.codebar .g{background:#3FB950}
.codebar .fname { margin-left: 6px; font-family: var(--fm); font-size: 12px; color: var(--muted); }
.codebar .lang { margin-left: auto; font-family: var(--fm); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.codebar .copy { background: var(--elevated); border: 1px solid var(--border-2); color: var(--slate); font-family: var(--fm); font-size: 11px; padding: 4px 9px; border-radius: 5px; cursor: pointer; }
.codebar .copy:hover { color: var(--acc); border-color: var(--acc-dim); }
.codeblock pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.7; }
.codeblock code { font-family: var(--fm); color: #C9D1D9; }
.t-c { color: #8B949E; } /* comment */
.t-k { color: #FF7B72; } /* keyword */
.t-s { color: #A5D6FF; } /* string */
.t-f { color: #D2A8FF; } /* function */
.t-n { color: #79C0FF; } /* number/var */
.t-o { color: #3FB950; } /* output ok */

/* Showcase split (code) */
.code-split { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
@media (min-width: 920px) { .code-split { grid-template-columns: 1fr 1.1fr; } }
.code-copy h2 { font-family: var(--fb); font-size: clamp(22px,3.4vw,30px); font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.code-copy p { color: var(--slate); font-size: 15px; margin-bottom: 18px; }
.code-feats { display: flex; flex-direction: column; gap: 10px; }
.code-feat { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--slate); }
.code-feat .ck { color: var(--acc); font-family: var(--fm); flex-shrink: 0; }

/* Blog */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.post:hover { border-color: var(--border-2); transform: translateY(-3px); }
.post-media { aspect-ratio: 16/9; background: var(--elevated); overflow: hidden; }
.post-media svg { width: 100%; height: 100%; }
.post-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.post-tag { font-family: var(--fm); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--acc); margin-bottom: 9px; }
.post-body h3 { font-family: var(--fb); font-size: 16.5px; font-weight: 600; line-height: 1.3; margin-bottom: 10px; flex: 1; }
.post-body h3 a { color: var(--ink); }
.post-body h3 a:hover { color: var(--acc); text-decoration: none; }
.post-meta { display: flex; gap: 10px; font-family: var(--fm); font-size: 11.5px; color: var(--muted); }

/* Ethics / disclosure band */
.ethics { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 30px; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .ethics { grid-template-columns: auto 1fr auto; align-items: center; } }
.ethics .ic { font-size: 32px; }
.ethics h3 { font-family: var(--fb); font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.ethics p { font-size: 14px; color: var(--slate); max-width: 60ch; }
.ethics code { font-family: var(--fm); color: var(--cyan); font-size: 13px; }

/* Footer */
.site-footer { background: var(--surface); padding-block: 48px 28px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; color: var(--slate); max-width: 36ch; }
.footer-brand .pgp { font-family: var(--fm); font-size: 11.5px; color: var(--muted); margin-top: 12px; }
.footer-col h4 { font-family: var(--fm); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 13px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--slate); font-size: 13.5px; }
.footer-col a:hover { color: var(--acc); }
.footer-bottom { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-family: var(--fm); font-size: 12px; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
