:root {
    --bg-deep: #000000;
    --bg-primary: #0c0c0c;
    --bg-elevated: #141414;
    --bg-surface: #1c1c1c;
    --bg-card: #0f0f0f;
    --fg-primary: #ffffff;
    --fg-secondary: #b4b4b4;
    --fg-muted: #6b6b6b;
    --accent: #6366f1;
    --accent-bright: #818cf8;
    --accent-dim: #4f46e5;
    --border: #2a2a2a;
    --border-subtle: #1f1f1f;
    --critical: #ef4444;
    --high: #f97316;
    --medium: #eab308;
    --low: #22c55e;
    --info: #3b82f6;
    --code-bg: #0d0d0d;
    --code-border: #262626;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--fg-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(90deg);
}

.logo-text {
    font-weight: 600;
    font-size: 15px;
    color: var(--fg-primary);
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

/* Main */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 32px 100px;
}

footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 32px;
    text-align: center;
    color: var(--fg-muted);
    font-size: 13px;
}

/* Hero */
.hero {
    padding: 60px 0 80px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--accent-dim);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.hero-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent-bright);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    max-width: 800px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .tagline {
    font-size: 20px;
    color: var(--fg-secondary);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border-subtle);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--fg-primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 13px;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-muted);
}

.section-header a {
    font-size: 14px;
    color: var(--accent-bright);
    text-decoration: none;
}

.section-header a:hover {
    text-decoration: underline;
}

/* Research Cards */
.research-grid {
    display: grid;
    gap: 16px;
}

.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
    transition: all 0.3s ease;
    text-decoration: none;
}

.research-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.research-card-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--fg-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.research-card-content .excerpt {
    font-size: 15px;
    color: var(--fg-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.research-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 13px;
    color: var(--fg-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.research-card-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Severity Badges */
.severity {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.severity-critical { background: var(--critical); color: #fff; }
.severity-high { background: var(--high); color: #000; }
.severity-medium { background: var(--medium); color: #000; }
.severity-low { background: var(--low); color: #000; }

.cvss {
    font-size: 24px;
    font-weight: 800;
    color: var(--fg-primary);
    font-family: 'SF Mono', ui-monospace, monospace;
}

/* Tags */
.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--fg-secondary);
}

/* Focus Areas */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.focus-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.focus-card:hover {
    border-color: var(--accent);
}

.focus-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.focus-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-primary);
    margin-bottom: 4px;
}

.focus-card p {
    font-size: 12px;
    color: var(--fg-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.empty-state p {
    color: var(--fg-muted);
    font-size: 15px;
}

/* Post list fallback */
.post-list {
    list-style: none;
}

.post-list li {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.post-list li:hover {
    border-color: var(--accent);
}

.post-list a {
    font-size: 22px;
    font-weight: 700;
    color: var(--fg-primary);
}

.post-list time {
    display: block;
    font-size: 13px;
    color: var(--fg-muted);
    margin-top: 8px;
    font-family: 'SF Mono', ui-monospace, monospace;
}

.post-list .description {
    font-size: 15px;
    color: var(--fg-secondary);
    margin-top: 16px;
    line-height: 1.6;
}

/* Articles */
article {
    max-width: 760px;
}

.article-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-header .category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-bright);
    margin-bottom: 16px;
}

.article-header h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.article-header .meta {
    display: flex;
    gap: 24px;
    color: var(--fg-muted);
    font-size: 14px;
}

.article-header .meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Advisory Box */
.advisory {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--critical);
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
}

.advisory-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.advisory-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg-primary);
}

.advisory-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.advisory-meta dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    margin-bottom: 4px;
}

.advisory-meta dd {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-primary);
    font-family: 'SF Mono', ui-monospace, monospace;
}

/* Article Content */
.article-content {
    font-size: 17px;
    line-height: 1.8;
}

.article-content p {
    color: var(--fg-secondary);
    margin-bottom: 24px;
}

.article-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--fg-primary);
    margin-top: 64px;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg-primary);
    margin-top: 48px;
    margin-bottom: 16px;
}

.article-content strong {
    color: var(--fg-primary);
    font-weight: 600;
}

.article-content a {
    color: var(--accent-bright);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content ul, .article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--fg-secondary);
}

.article-content li {
    margin-bottom: 8px;
}

.article-content li::marker {
    color: var(--accent);
}

/* Code Blocks */
.article-content pre {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
    margin: 32px 0;
    font-size: 14px;
    line-height: 1.7;
}

.article-content code {
    font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
}

.article-content p code {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    color: var(--accent-bright);
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--fg-secondary);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 14px;
}

.article-content th, .article-content td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}

.article-content th {
    background: var(--bg-surface);
    font-weight: 600;
    color: var(--fg-primary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.article-content td {
    color: var(--fg-secondary);
}

.article-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 32px 0;
}

/* Contact Cards */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: var(--accent);
}

.contact-card .label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 8px;
}

.contact-card .value {
    font-size: 15px;
    color: var(--fg-primary);
    font-family: 'SF Mono', ui-monospace, monospace;
}

.contact-card a {
    color: var(--accent-bright);
}

/* Disclosure Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
    margin: 32px 0;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -29px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-deep);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-bright);
    font-family: 'SF Mono', ui-monospace, monospace;
    margin-bottom: 4px;
}

.timeline-content {
    font-size: 15px;
    color: var(--fg-secondary);
}

/* Affected Versions Table */
.versions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.versions-table th {
    background: var(--bg-surface);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    border-bottom: 1px solid var(--border);
}

.versions-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--fg-secondary);
}

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

.versions-table .status-fixed {
    color: var(--low);
    font-weight: 600;
}

.versions-table .status-vulnerable {
    color: var(--critical);
    font-weight: 600;
}

/* Impact Box */
.impact-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
}

.impact-box.critical { border-color: rgba(239, 68, 68, 0.3); }
.impact-box.high { border-color: rgba(249, 115, 22, 0.3); background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.05) 100%); }

.impact-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--critical);
}

.impact-box p {
    margin: 0;
    color: var(--fg-primary);
}

/* Code Block with Copy */
.code-block {
    position: relative;
    margin: 32px 0;
}

.code-block pre {
    margin: 0;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--fg-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--bg-elevated);
    color: var(--fg-primary);
}

/* CVSS Display */
.cvss-display {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
}

.cvss-score {
    font-size: 36px;
    font-weight: 800;
    font-family: 'SF Mono', ui-monospace, monospace;
}

.cvss-score.critical { color: var(--critical); }
.cvss-score.high { color: var(--high); }
.cvss-score.medium { color: var(--medium); }
.cvss-score.low { color: var(--low); }

.cvss-details {
    flex: 1;
}

.cvss-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    margin-bottom: 4px;
}

.cvss-vector {
    font-size: 13px;
    font-family: 'SF Mono', ui-monospace, monospace;
    color: var(--fg-secondary);
    word-break: break-all;
}

/* Findings Tracker Table */
.findings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.findings-table th {
    background: var(--bg-surface);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    border-bottom: 1px solid var(--border);
}

.findings-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
}

.findings-table tr:hover {
    background: var(--bg-elevated);
}

.findings-table a {
    color: var(--accent-bright);
    text-decoration: none;
    font-weight: 500;
}

.findings-table a:hover {
    text-decoration: underline;
}

/* Talks Section */
.talks-grid {
    display: grid;
    gap: 16px;
}

.talk-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    transition: all 0.2s ease;
}

.talk-card:hover {
    border-color: var(--accent);
}

.talk-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--fg-primary);
    margin-bottom: 8px;
}

.talk-meta {
    font-size: 14px;
    color: var(--fg-muted);
}

.talk-links {
    display: flex;
    gap: 8px;
}

.talk-link {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--fg-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.talk-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--fg-primary);
}

/* Disclosure Policy */
.policy-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin: 32px 0;
}

.policy-box h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--fg-primary);
}

.policy-box p {
    color: var(--fg-secondary);
    margin-bottom: 12px;
}

.policy-box ul {
    color: var(--fg-secondary);
    padding-left: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .focus-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .research-card {
        grid-template-columns: 1fr;
    }

    .research-card-side {
        flex-direction: row;
        justify-content: flex-start;
    }

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

@media (max-width: 640px) {
    nav {
        padding: 0 20px;
    }

    main {
        padding: 100px 20px 80px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero .tagline {
        font-size: 17px;
    }

    .focus-grid {
        grid-template-columns: 1fr 1fr;
    }

    .article-header h1 {
        font-size: 32px;
    }

    .research-card {
        padding: 24px;
    }
}
