/* ============================================
   BrokerCat Security — Dark Cyber Theme
   ============================================ */

:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #12171f;
    --bg-card: #161c26;
    --bg-card-hover: #1c2330;
    --border: #1e2a3a;
    --border-bright: #2a3a52;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-dim: #555d68;
    --accent: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.15);
    --critical: #ff6b6b;
    --critical-bg: rgba(255, 107, 107, 0.12);
    --high: #f0883e;
    --high-bg: rgba(240, 136, 62, 0.12);
    --medium: #d29922;
    --medium-bg: rgba(210, 153, 34, 0.12);
    --low: #3fb950;
    --low-bg: rgba(63, 185, 80, 0.12);
    --terminal-bg: #0d1117;
    --terminal-text: #c9d1d9;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', 'Menlo', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.4), 0 0 0 1px var(--border-bright);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.scanline {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.brand-icon { font-size: 1.3rem; }
.brand-accent { color: var(--accent); font-weight: 400; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.rss-link { padding: 4px 8px; }
.rss-link svg { color: var(--text-dim); transition: color 0.2s; }
.rss-link:hover svg { color: #f0883e; }

/* ============================================
   HERO
   ============================================ */

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-highlight {
    color: var(--accent);
    white-space: nowrap;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.stat { text-align: center; }
.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Terminal */
.terminal-window {
    background: var(--terminal-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.terminal-header {
    background: #161b22;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.terminal-dot.red    { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green  { background: #27c93f; }
.terminal-title {
    margin-left: 12px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--terminal-text);
    line-height: 1.85;
    min-height: 180px;
}

.prompt         { color: var(--accent); margin-right: 8px; font-weight: 600; }
.cmd-flag       { color: #d2a8ff; }
.cmd-string     { color: #a5d6ff; }
.output-dim     { color: var(--text-dim); font-size: 0.8rem; }
.output-bright  { color: var(--text-primary); font-weight: 600; }
.output-tag     { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.output-tag.critical { color: var(--critical); background: var(--critical-bg); }
.output-tag.high     { color: var(--high); background: var(--high-bg); }
.cursor         { color: var(--accent); animation: blink 1s step-end infinite; }

@keyframes blink {
    50% { opacity: 0; }
}

/* ============================================
   CONTENT GRID
   ============================================ */

.content-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 64px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-primary);
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================
   POST CARDS
   ============================================ */

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.2s;
    box-shadow: var(--shadow-card);
}

.post-card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.post-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color 0.2s;
}

.post-title:hover {
    color: var(--accent);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cve-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.critical { color: var(--critical); background: var(--critical-bg); }
.badge.high     { color: var(--high); background: var(--high-bg); }
.badge.medium   { color: var(--medium); background: var(--medium-bg); }
.badge.low      { color: var(--low); background: var(--low-bg); }
.badge.category { color: var(--accent); background: var(--accent-glow); }

/* ============================================
   POST PAGE (individual)
   ============================================ */

.post-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.post-page .post-date {
    display: block;
    margin-bottom: 8px;
}

.post-page h2 {
    font-size: 1.4rem;
    margin: 32px 0 12px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.post-page h3 {
    font-size: 1.15rem;
    margin: 24px 0 8px;
    color: var(--text-primary);
}

.post-page p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.post-page ul, .post-page ol {
    color: var(--text-secondary);
    margin-left: 20px;
    margin-bottom: 16px;
}

.post-page li { margin-bottom: 6px; }

.post-page code {
    background: var(--terminal-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--accent);
}

.post-page pre {
    background: var(--terminal-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.post-page pre code {
    background: none;
    padding: 0;
    color: var(--terminal-text);
}

.post-page a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.post-page a:hover {
    border-bottom-color: var(--accent);
}

/* CVE detail */
.cve-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    border-left: 3px solid var(--border-bright);
}

.cve-item.critical { border-left-color: var(--critical); }
.cve-item.high     { border-left-color: var(--high); }
.cve-item.medium   { border-left-color: var(--medium); }
.cve-item.low      { border-left-color: var(--low); }

.cve-id {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cve-score {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cve-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.cve-poc-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--critical);
    margin-bottom: 6px;
}

.cve-poc {
    background: var(--terminal-bg);
    border-radius: var(--radius);
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-x: auto;
    margin-bottom: 8px;
}

.cve-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cve-link {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.cve-link:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.sidebar-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.category-list li:last-child { border-bottom: none; }

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    transition: color 0.2s;
}

.category-list a:hover { color: var(--accent); }
.category-list .cat-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.rss-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f0883e15;
    border: 1px solid #f0883e30;
    border-radius: var(--radius);
    color: #f0883e;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.rss-button:hover {
    background: #f0883e25;
    border-color: #f0883e50;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.legend-item:last-child { margin-bottom: 0; }

/* ============================================
   FOOTER
   ============================================ */

.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 24px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.footer-disclaimer {
    font-size: 0.75rem;
    margin-top: 4px;
    color: var(--text-dim);
    opacity: 0.6;
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */

.archive-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.archive-year {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin: 32px 0 16px;
}

.archive-year:first-child { margin-top: 0; }

.archive-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.archive-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.archive-title {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.archive-title:hover { color: var(--accent); }

.archive-badge {
    margin-left: auto;
    white-space: nowrap;
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.about-page h1 { font-size: 2rem; margin-bottom: 24px; }
.about-page h2 { font-size: 1.3rem; margin: 32px 0 12px; color: var(--accent); }
.about-page p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.about-page ul { color: var(--text-secondary); margin-left: 20px; margin-bottom: 16px; }
.about-page li { margin-bottom: 8px; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 20px 32px;
        gap: 32px;
    }
    .hero-title { font-size: 1.8rem; }
    .content-grid {
        grid-template-columns: 1fr;
    }
    .sidebar { position: static; }
    .nav-links { gap: 16px; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 1.5rem; }
    .terminal-window { display: none; }
    .hero-stats { gap: 20px; }
    .stat-value { font-size: 1.5rem; }
    .post-card { padding: 16px; }
}
