/* CIA Security Report - Professional Portfolio Styles */

:root {
    /* Colors - Security/Red Team Theme */
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --accent: #f97316;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #dc2626;
    --info: #3b82f6;
    
    /* Dark Theme */
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --bg-surface: #1f1f1f;
    --border: #2a2a2a;
    --border-light: #3a3a3a;
    
    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Gradients */
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
    --gradient-hero: linear-gradient(135deg, rgba(220,38,38,0.1) 0%, rgba(249,115,22,0.05) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.7);
    --shadow-glow-red: 0 0 20px rgba(220,38,38,0.4);
    --shadow-glow-green: 0 0 20px rgba(34,197,94,0.4);
    
    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --nav-height: 64px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-size: 1.5rem;
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--gradient-danger);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-id {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    background: var(--bg-surface);
    border-radius: 4px;
    font-family: var(--font-mono);
}

.project-id.classified {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--gradient-danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-red);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 4rem) 2rem 4rem;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(220,38,38,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249,115,22,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle, rgba(220,38,38,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-content {
    max-width: 700px;
    z-index: 1;
}

.hero-classification {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.classification-badge {
    padding: 0.5rem 1rem;
    background: rgba(220,38,38,0.2);
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-light);
}

.classification-badge.secondary {
    background: rgba(249,115,22,0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.methodology-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.method-badge {
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Terminal Animation */
.hero-visual {
    z-index: 1;
}

.terminal-animation {
    width: 400px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #0d0d0d;
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.terminal-line {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    animation: typewriter 0.5s steps(40) forwards;
}

.terminal-line.success { color: #22c55e; }
.terminal-line.warning { color: #eab308; }
.terminal-line.danger { color: #ef4444; font-weight: 700; }

@keyframes typewriter {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Sections */
.section {
    margin-bottom: 6rem;
}

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

.section-number {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Critical Alert */
.critical-alert {
    display: flex;
    gap: 1.5rem;
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.alert-icon {
    font-size: 2rem;
}

.alert-content h3 {
    font-size: 1.125rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.alert-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Findings Grid */
.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.finding-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.finding-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.finding-card.critical {
    border-left: 4px solid #dc2626;
}

.finding-card.high {
    border-left: 4px solid #f97316;
}

.finding-card.medium {
    border-left: 4px solid #eab308;
}

.finding-severity {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.finding-card.critical .finding-severity {
    background: rgba(220,38,38,0.2);
    color: #ef4444;
}

.finding-card.high .finding-severity {
    background: rgba(249,115,22,0.2);
    color: #fb923c;
}

.finding-card.medium .finding-severity {
    background: rgba(234,179,8,0.2);
    color: #facc15;
}

.finding-id {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.finding-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.finding-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.cvss-score {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--bg-surface);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table code {
    background: var(--bg-surface);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.data-table.comparison .status-bad {
    color: #ef4444;
}

.data-table.comparison .status-good {
    color: #22c55e;
}

.data-table.comparison .improvement {
    color: #22c55e;
    font-weight: 700;
}

/* Tools Grid */
.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.tool-phase {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tool-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.tool-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mermaid Diagrams */
.mermaid {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

/* Attack Phase */
.attack-phase {
    margin: 2.5rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.phase-header-attack {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.phase-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.phase-badge.red {
    background: var(--gradient-danger);
    color: white;
}

.phase-header-attack h3 {
    font-size: 1.25rem;
}

/* Vulnerability Box */
.vulnerability-box {
    background: rgba(220,38,38,0.05);
    border: 1px solid rgba(220,38,38,0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.vuln-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.vuln-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.vuln-badge.critical {
    background: #dc2626;
    color: white;
}

.vuln-id {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.vulnerability-box h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* CVE Info */
.cve-info {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.cve-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cve-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    background: rgba(220,38,38,0.2);
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary-light);
}

.cvss-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    background: var(--bg-card);
    border-radius: 4px;
    color: var(--text-secondary);
}

.cve-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Code Sections */
.code-section {
    margin: 1.5rem 0;
}

.code-section h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

pre {
    background: #0d0d0d !important;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem !important;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.5;
}

code {
    font-family: var(--font-mono);
}

.exploit-result {
    margin-top: 1.5rem;
}

/* Remediation Sections */
.remediation-section {
    margin: 2rem 0;
}

.remediation-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--success);
}

/* Pipeline Diagram */
.pipeline-diagram {
    margin: 2rem 0;
}

.pipeline-diagram h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Secret Management */
.secret-management {
    margin: 2rem 0;
}

.secret-management h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Posture Chart */
.posture-chart {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.posture-chart h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.status-card.closed {
    border-color: rgba(34,197,94,0.3);
}

.status-card:hover {
    transform: translateY(-2px);
}

.status-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.status-id {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.status-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 0.5rem;
}

.status-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Recommendations Grid */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.rec-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.rec-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.rec-card.immediate {
    border-left: 4px solid #dc2626;
}

.rec-card.short-term {
    border-left: 4px solid #f97316;
}

.rec-card.long-term {
    border-left: 4px solid #3b82f6;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.rec-priority {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.rec-priority.p1 { background: rgba(220,38,38,0.2); color: #ef4444; }
.rec-priority.p2 { background: rgba(249,115,22,0.2); color: #fb923c; }
.rec-priority.p3 { background: rgba(59,130,246,0.2); color: #60a5fa; }

.rec-timeline {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rec-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.rec-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.rec-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.rec-status.complete { color: #22c55e; }
.rec-status.pending { color: #eab308; }
.rec-status.planned { color: #60a5fa; }

/* Certification Box */
.certification-box {
    background: var(--gradient-hero);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.cert-seal {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.cert-header h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.cert-details p {
    margin: 0.25rem 0;
    font-size: 1rem;
}

.cert-details p:first-child {
    font-size: 1.25rem;
    font-weight: 700;
}

.classification-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.class-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    background: rgba(220,38,38,0.1);
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary-light);
}

.class-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    align-self: center;
}

/* Document Info */
.document-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.document-info h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.meta-table {
    width: 100%;
}

.meta-table td {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.meta-table td:first-child {
    color: var(--text-muted);
    width: 140px;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.footer-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: calc(var(--nav-height) + 2rem) 1rem 2rem;
    }
    
    .hero-meta {
        justify-content: center;
    }
    
    .methodology-badges {
        justify-content: center;
    }
    
    .terminal-animation {
        width: 100%;
        max-width: 350px;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .attack-phase {
        padding: 1.25rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Print */
@media print {
    .navbar, .btn-download, .hero-visual {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}
