body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #f8fafc 0%, #e0e7ff 100%);
    margin: 0;
    padding: 0;
    color: #2d3e50;
    line-height: 1.6;
}

header {
    background: linear-gradient(120deg, #4fa3ff 0%, #2d3e50 100%);
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 1px;
}

header p {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.year-group {
    margin-bottom: 2.5rem;
}

.year-title {
    font-size: 1.8rem;
    color: #2d3e50;
    border-left: 5px solid #4fa3ff;
    padding-left: 0.7rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.month-group {
    margin-bottom: 2rem;
}

.month-title {
    font-size: 1.3rem;
    color: #4fa3ff;
    margin-bottom: 1rem;
    margin-left: 1.2rem;
    font-weight: bold;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0 2.2rem;
}

.article-item {
    background: linear-gradient(120deg, #f0f6ff 0%, #e8f4fd 100%);
    margin-bottom: 1rem;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    transition: box-shadow 0.3s, transform 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    background: linear-gradient(120deg, #e0e7ff 0%, #f8fafc 100%);
}

.article-date {
    font-weight: bold;
    color: #2d3e50;
    margin-right: 0.7rem;
    font-size: 1rem;
}

.article-title {
    color: #2d3e50;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
}

.article-title:hover {
    text-decoration: underline;
    color: #0077b5;
}

.add-article {
    margin: 2rem 0 0 0;
    text-align: center;
    color: #888;
    font-size: 1rem;
}

.linkedin-box {
    background: linear-gradient(120deg, #e8f4fd 0%, #f0f6ff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.linkedin-box a {
    color: #0077b5;
    font-weight: bold;
    text-decoration: none;
}

.linkedin-box a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    background: linear-gradient(120deg, #007BFF 0%, #0056b3 100%);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    margin: 2rem 0;
    max-width: 200px;
}

.back-link:hover {
    background: linear-gradient(120deg, #2d3e50 0%, #4fa3ff 100%);
}

/* ------------------ CODE BLOCK (Dark Theme) ------------------ */
pre {
    background: #0f172a; /* dark slate */
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #24324a;
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    overflow-x: auto;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 100%;
    box-shadow: 0 4px 18px -4px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.02) inset;
    color: #e2e8f0; /* base text */
    position: relative;
}

pre::-webkit-scrollbar { height: 10px; }
pre::-webkit-scrollbar-track { background: #142133; }
pre::-webkit-scrollbar-thumb { background: #2d425d; border-radius: 6px; }
pre::-webkit-scrollbar-thumb:hover { background: #365170; }

pre code { 
    background: transparent !important; 
    padding: 0; 
    color: inherit; 
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    white-space: pre;
}

/* Inline code (not in pre) */
code:not(pre code) {
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    background: #1e293b;
    color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid #2a3b52;
}

/* Optional language label (future enhancement) */
pre[data-lang]::before {
    content: attr(data-lang);
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.65rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.08);
    padding: 4px 6px;
    border-radius: 4px;
    color: #94a3b8;
    font-weight: 600;
}

/* Basic token coloring (works if a highlighter adds these classes) */
.hljs-keyword, .token.keyword { color: #8b5cf6; font-weight: 600; }
.hljs-string, .token.string { color: #10b981; }
.hljs-number, .token.number { color: #f59e0b; }
.hljs-function, .token.function { color: #0ea5e9; }
.hljs-comment, .token.comment { color: #64748b; font-style: italic; }
.hljs-attr, .token.attr-name { color: #38bdf8; }
.hljs-literal, .token.boolean { color: #f472b6; }
.hljs-built_in, .token.builtin { color: #22d3ee; }

/* Selection inside code */
pre code::selection { background: #334155; color: #f8fafc; }
code:not(pre code)::selection { background: #334155; color: #f8fafc; }

/* Estilo para o botão Voltar */
.btn-outline-secondary {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(120deg, #f8fafc 0%, #e0e7ff 100%);
    color: #2d3e50;
    border: 2px solid #4fa3ff;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary:hover {
    background: linear-gradient(120deg, #4fa3ff 0%, #2d3e50 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn-outline-secondary i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Estilo para o botão Voltar no final da página */
.back-link {
    display: inline-block;
    background: linear-gradient(120deg, #f8fafc 0%, #e0e7ff 100%);
    color: #2d3e50;
    border: 2px solid #4fa3ff;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 200px;
}

.back-link:hover {
    background: linear-gradient(120deg, #4fa3ff 0%, #2d3e50 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .year-title {
        font-size: 1.3rem;
    }
    .month-title {
        font-size: 1.1rem;
    }
    .article-title {
        font-size: 1rem;
    }
}

/* --- Article specific reusable classes (refactoring inline styles) --- */
.article-hero {
    max-width:300px;
    float:right;
    margin:0 0 1.5rem 2rem;
    border-radius:12px;
    box-shadow:0 2px 12px rgba(0,0,0,.08);
}
.arch-diagram {
    max-width:100%;
    border-radius:12px;
    box-shadow:0 2px 12px rgba(0,0,0,.08);
    margin:1rem 0 1.5rem;
}
.linkedin-box.inline {
    margin-bottom:1.5rem;
    display:flex;
    align-items:center;
    padding:0; /* override box default if needed */
    background:transparent;
    box-shadow:none;
}
.linkedin-box.inline img.logo {
    width:33%;
    max-width:40px;
    margin-right:10px;
}
.linkedin-box.inline .date { margin-left:1.5rem; font-size:.85rem; color:#374151; }
.compare-table table { width:100%; border-collapse:collapse; }
.compare-table thead tr { border-bottom:1px solid #e5e7eb; }
.compare-table th { text-align:left; padding:.4rem; font-weight:600; }
.compare-table td { padding:.4rem; }
.cta-box {
    background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
    color:#fff;
    padding:1.5rem 1.25rem;
    border-radius:8px;
    margin:2rem 0;
    text-align:center;
}
.cta-box .cta-note { font-size:.85rem; }
.cta-box .cta-btn {
    display:inline-block;
    margin-top:.75rem;
    background:rgba(255,255,255,.2);
    color:#fff;
    padding:.5rem 1rem;
    border-radius:6px;
    text-decoration:none;
    font-weight:600;
}
.cta-box .cta-btn:hover { background:rgba(255,255,255,.28); }
.article-foot { text-align:center; font-size:.85rem; color:#6b7280; margin-top:3rem; }
.chart-block { margin:1.5rem 0 2.25rem; }
.chart-block h3 { margin-top:0; }
.chart-wrapper { display:grid; gap:.65rem; margin-top:.75rem; }
.metric-row { display:flex; align-items:center; gap:.75rem; }
.metric-label { flex:0 0 160px; font-size:.85rem; font-weight:600; color:#374151; }
.metric-bars { flex:1; display:flex; align-items:flex-end; gap:.35rem; }
.bar { position:relative; flex:1; height:34px; border-radius:6px; background:#e5e7eb; overflow:hidden; }
.bar-inner { position:absolute; top:0; left:0; height:100%; background:linear-gradient(135deg,#dc2626 0%,#ef4444 100%); width:0; display:flex; align-items:center; justify-content:flex-end; padding:0 .4rem; color:#fff; font-size:.65rem; font-weight:600; letter-spacing:.5px; }
.bar.after .bar-inner { background:linear-gradient(135deg,#16a34a 0%,#22c55e 100%); }
.metric-legend { display:flex; gap:1rem; margin-top:.6rem; font-size:.7rem; color:#4b5563; }
.metric-legend span { display:inline-flex; align-items:center; gap:.3rem; }
.legend-box { width:16px; height:16px; border-radius:4px; background:#dc2626; }
.legend-box.after { background:#16a34a; }
.improvement-note { font-size:.7rem; color:#64748b; margin-top:.4rem; }
.chart-accessibility { font-size:.65rem; color:#6b7280; margin-top:.4rem; }
.visually-hidden { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0 0 0 0) !important; white-space:nowrap !important; border:0 !important; }
.mermaid-wrap { margin:1rem 0 1.5rem; border:1px solid #e5e7eb; border-radius:12px; background:#ffffff; padding:.75rem .9rem; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.mermaid-wrap h3 { margin:.25rem 0 .75rem; font-size:1rem; font-weight:600; color:#374151; }