/* Styles for individual article pages (artykuly/[id]/index.html) */

/* ── Hero ───────────────────────────────────────────────────────────────── */

.article_hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 340px;
    background-color: #1a1a1a;
    display: flex;
    align-items: flex-end;
    margin-top: var(--navbar-height);
}

.article_hero::before {
    content: '';
    position: absolute;
    inset: -12px;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
}

.article_hero_overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    padding: 40px 20px 30px;
}

.article_hero_content {
    max-width: 860px;
    margin: 0 auto;
}

.article_title {
    color: var(--polygon-color);
    font-family: Roboto, sans-serif;
    font-size: clamp(1.6em, 4vw, 2.4em);
    margin: 0 0 10px;
    line-height: 1.2;
}

.article_date_hero {
    color: #bbb;
    font-family: Lato, sans-serif;
    font-size: 0.95em;
    margin: 0 0 12px;
}

.article_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.article_tag {
    background-color: rgba(250, 180, 10, 0.18);
    border: 1px solid var(--polygon-color);
    color: var(--polygon-color);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.82em;
    font-family: Lato, sans-serif;
    font-weight: bold;
}

/* ── Article body ───────────────────────────────────────────────────────── */

.article_page_container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.article_layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.article_main {
    flex: 1;
    min-width: 0;
    max-width: 860px;
}

.article_toc {
    position: sticky;
    top: calc(var(--navbar-height) + 24px);
    width: 200px;
    flex-shrink: 0;
    display: none;
}

.article_toc.toc_visible {
    display: block;
}

.toc_title {
    color: var(--polygon-color);
    font-family: Roboto, sans-serif;
    font-size: 0.78em;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.toc_link {
    display: block;
    color: #888;
    font-family: Lato, sans-serif;
    font-size: 0.85em;
    line-height: 1.4;
    padding: 4px 0 4px 10px;
    border-left: 2px solid #333;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.toc_link:hover {
    color: #ccc;
}

.toc_link.toc_active {
    color: var(--polygon-color);
    border-left-color: var(--polygon-color);
}

.toc_link.toc_h3 {
    padding-left: 20px;
    font-size: 0.8em;
}

@media (max-width: 1080px) {
    .article_toc {
        display: none !important;
    }
}

.article_back {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 0.95em;
}

.article_content {
    color: #e0e0e0;
    font-family: Lato, sans-serif;
    font-size: 1.05em;
    line-height: 1.75;
}

.article_content h1,
.article_content h2,
.article_content h3,
.article_content h4 {
    color: var(--polygon-color);
    font-family: Roboto, sans-serif;
    margin-top: 1.6em;
    margin-bottom: 0.4em;
    line-height: 1.25;
}

.article_content h1 { font-size: 1.8em; }
.article_content h2 { font-size: 1.4em; }
.article_content h3 { font-size: 1.15em; }

.article_content p {
    margin: 0 0 1em;
}

.article_content a {
    color: var(--polygon-color);
    text-decoration: none;
    font-weight: bold;
}

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

.article_content img {
    max-width: 100%;
    border-radius: 6px;
    margin: 12px 0;
    display: block;
}

.article_content ul,
.article_content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.article_content li {
    margin-bottom: 0.4em;
}

.article_content li::marker {
    color: var(--polygon-color);
}

.article_content blockquote {
    border-left: 3px solid var(--polygon-color);
    margin: 1em 0;
    padding: 8px 16px;
    color: #aaa;
    background: rgba(250, 180, 10, 0.06);
}

.article_content code {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    font-family: monospace;
    color: #f0c060;
}

.article_content pre {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 14px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.article_content pre code {
    border: none;
    padding: 0;
    background: none;
}

.article_content hr {
    border: none;
    border-top: 1px solid #444;
    margin: 2em 0;
}

.article_content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: 0.95em;
}

.article_content th,
.article_content td {
    border: 1px solid #444;
    padding: 8px 12px;
    text-align: left;
}

.article_content th {
    background-color: rgba(250, 180, 10, 0.12);
    color: var(--polygon-color);
    font-weight: bold;
}

.article_content tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.article_footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.article_attribution {
    color: #888;
    font-size: 0.85em;
    font-style: italic;
    margin: 0;
}
