:root {
    --text-main: #333333;
    --text-light: #555555;
    --bg-main: #ffffff;
    --bg-alt: #f8f9fa;
    --border-color: #e5e5e5;
    --accent-blue: #0056b3;
    --accent-red: #d93025;
    --code-bg: #f4f4f4;
    
    /* Heatmap colors */
    --heat-low: rgba(255, 235, 238, 0.7);
    --heat-med: rgba(239, 154, 154, 0.6);
    --heat-high: rgba(229, 57, 53, 0.8);
    --heat-highest: rgba(183, 28, 28, 0.8);
}

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

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-alt);
}

h1, h2, h3, h4 {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    color: #111;
    margin-bottom: 1rem;
    line-height: 1.3;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

ul, ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
    font-size: 1.05rem;
}

li {
    margin-bottom: 0.5rem;
}

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

/* Hero Section */
.hero {
    background-color: var(--bg-main);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.authors {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.author-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.author {
    display: inline-block;
    margin: 0 0.5rem;
    color: var(--accent-blue);
}

.author a {
    color: var(--accent-blue);
    text-decoration: none;
}

.author a:hover {
    text-decoration: underline;
}

.affiliations {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.affiliation {
    display: inline-block;
    margin: 0 0.5rem;
}

.corresponding-author {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.corresponding-author a {
    color: var(--accent-blue);
    text-decoration: none;
}

.corresponding-author a:hover {
    text-decoration: underline;
}

.venue {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* Buttons */
.links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #24292e;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn:hover {
    background-color: #000;
    transform: translateY(-2px);
}

/* Main Sections */
.section {
    background: var(--bg-main);
    padding: 3rem;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.section h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Abstract & TLDR */
.tldr {
    background-color: #e8f0fe;
    padding: 1.5rem;
    border-radius: 6px;
    margin-top: 1.5rem;
    border-left: 4px solid var(--accent-blue);
    font-size: 1.1rem;
}

/* Terminal / Case Study */
.terminal-container {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.terminal-header {
    background-color: #323233;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.terminal-title {
    color: #999;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    margin-left: 10px;
}

.terminal-body {
    padding: 20px;
    height: 350px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.terminal-controls {
    background-color: #252526;
    padding: 10px;
    text-align: right;
    border-top: 1px solid #444;
}

.btn-small {
    background: #444;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Google Sans', sans-serif;
    font-size: 0.85rem;
}

.btn-small:hover { background: #555; }

/* Terminal text styles */
.term-time { color: #888; }
.term-actor { color: #569cd6; font-weight: bold; }
.term-text { color: #d4d4d4; }
.msg-thought .term-text { color: #6a9955; font-style: italic; }
.msg-attacker .term-text { color: #ce9178; }
.text-red { color: #f48771 !important; }
.msg-system .term-time, .msg-system .term-actor { display: none; }
.msg-system .term-text { color: #888; font-style: italic; }
.bold { font-weight: bold; }

/* Method Grid */
.method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.method-card {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
}

.method-num {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--accent-blue);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Google Sans', sans-serif;
}

.method-card h3 {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    color: var(--accent-blue);
}

.compact-list {
    padding-left: 1.2rem;
    font-size: 0.95rem;
}

/* Flex layout for vectors/payloads */
.flex-row {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.flex-col {
    flex: 1;
}

/* Images */
.image-container {
    text-align: center;
    margin: 2rem 0;
}

.image-container figcaption {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.8rem;
    line-height: 1.5;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.shadow-img {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.mb-2 {
    margin-bottom: 2rem;
}

.concept-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    height: 100%;
}

.vector-box { border: 2px solid #4a90e2; }
.payload-box { border: 2px solid #e24a4a; }

.concept-box h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.vector-box h3 { color: #4a90e2; }
.payload-box h3 { color: #e24a4a; }

/* Data Table & Analysis */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
}

.data-table th, .data-table td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: center;
}

.data-table th {
    background-color: #f1f3f5;
    font-family: 'Google Sans', sans-serif;
}

.data-table td:first-child {
    text-align: left;
}

.bg-red-low { background-color: var(--heat-low); font-weight: bold; color: #333;}
.bg-red-med { background-color: var(--heat-med); font-weight: bold; color: #333;}
.bg-red-high { background-color: var(--heat-high); color: white; font-weight: bold;}
.bg-red-highest { background-color: var(--heat-highest); color: white; font-weight: bold;}

.analysis-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.analysis-box h4 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.analysis-box p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.analysis-box p:last-child {
    margin-bottom: 0;
}

.highlight-callout {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 0 4px 4px 0;
}

.highlight-callout h4 {
    margin-bottom: 0.5rem;
    color: #856404;
}

/* Defense Grid */
.defense-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.defense-item {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.defense-item h4 {
    margin-bottom: 0.5rem;
    color: #155724;
}

/* Bibtex */
.bibtex-box {
    background-color: var(--code-bg);
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.bibtex-box pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #333;
}

code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

@media (max-width: 800px) {
    .flex-row { flex-direction: column; }
    .method-grid { grid-template-columns: 1fr; }
    .defense-grid { grid-template-columns: 1fr; }
    .section { padding: 2rem 1.5rem; }
    .title { font-size: 2rem; }
}