
:root {
    /* Code background (Light) */
    --code-bg: #d3d3d3;

    /* Proton Sponsor Variables (Light) */
    --proton-bg: linear-gradient(135deg, rgba(109, 74, 255, 0.04) 0%, rgba(109, 74, 255, 0.01) 100%);
    --proton-border: rgba(109, 74, 255, 0.15);
    --proton-border-hover: rgba(109, 74, 255, 0.4);
    --proton-text: #5335d1;
    --proton-badge-bg: rgba(109, 74, 255, 0.08);
    --proton-btn-bg: #6d4aff;
    --proton-btn-hover: #5335d1;
    --proton-shadow: rgba(109, 74, 255, 0.05);

    /* Hostinger Sponsor Variables (Light) */
    --hostinger-bg: linear-gradient(135deg, rgba(103, 61, 230, 0.04) 0%, rgba(103, 61, 230, 0.01) 100%);
    --hostinger-border: rgba(103, 61, 230, 0.15);
    --hostinger-border-hover: rgba(103, 61, 230, 0.4);
    --hostinger-text: #4f29c4;
    --hostinger-badge-bg: rgba(103, 61, 230, 0.08);
    --hostinger-btn-bg: #673de6;
    --hostinger-btn-hover: #4f29c4;
    --hostinger-shadow: rgba(103, 61, 230, 0.05);
}

[data-theme="dark"] {
    /* Code background (Dark) */
    --code-bg: #393939;

    /* Proton Sponsor Variables (Dark) */
    --proton-bg: linear-gradient(135deg, rgba(109, 74, 255, 0.08) 0%, rgba(109, 74, 255, 0.02) 100%);
    --proton-border: rgba(109, 74, 255, 0.25);
    --proton-border-hover: rgba(109, 74, 255, 0.5);
    --proton-text: #a391ff;
    --proton-badge-bg: rgba(109, 74, 255, 0.15);
    --proton-btn-bg: #6d4aff;
    --proton-btn-hover: #8262ff;
    --proton-shadow: rgba(0, 0, 0, 0.25);

    /* Hostinger Sponsor Variables (Dark) */
    --hostinger-bg: linear-gradient(135deg, rgba(103, 61, 230, 0.08) 0%, rgba(103, 61, 230, 0.02) 100%);
    --hostinger-border: rgba(103, 61, 230, 0.25);
    --hostinger-border-hover: rgba(103, 61, 230, 0.5);
    --hostinger-text: #a68dff;
    --hostinger-badge-bg: rgba(103, 61, 230, 0.15);
    --hostinger-btn-bg: #673de6;
    --hostinger-btn-hover: #7a52ff;
    --hostinger-shadow: rgba(0, 0, 0, 0.25);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
}

.navbar-brand img {
    box-shadow: none;
    border-radius: 0;
}

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

code {
    margin-left: 5px;
    margin-right: 5px;
    background: var(--code-bg);
    padding: 3px 5px 3px 5px;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
}


.search-container {
    width: 100%;
    margin: 2rem auto 0;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-primary);
    outline: none;
    box-shadow: 0px 0px 5px rgb(0 0 0 / 25%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

[data-theme="dark"] .search-input {
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0px 0px 8px rgba(212, 175, 55, 0.18);
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0px 0px 5px rgb(0 0 0 / 25%), 0 0 0 3px rgba(214, 173, 96, 0.15);
}

.hero {
    max-width: 80%; 
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.hero .social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.hero .social-links a {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem; 
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero .social-links a:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.posts-section {
    margin: 3rem 1rem 3rem 1rem;
    padding: 0 2rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-title-sec {
    font-size: 1rem;
    font-weight: 100;
    margin-bottom: 2rem;
    color: var(--accent-primary);
}

.posts-list {
    list-style: none;
    margin-left: 0 !important;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.post-item-first {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    transition: all 0.2s ease;
}

.post-item:hover, .post-item-first:hover {
    padding-left: 1rem;
}

.post-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.post-link:hover {
    color: var(--accent-primary);
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    margin-left: 1rem;
}

.article-container {
    max-width: 760px; 
    margin: 0 auto;
    padding: 0 2rem 6rem;
}



.article-hero-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.article-header {
    margin-bottom: 3rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.meta-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.tag-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: default;
}

.tag-box:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}


.article-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-ai-summary {
    margin: 2rem 0 0 0;
    padding: 1.5rem;
    border-left: 5px solid var(--accent-primary);
    border-right: 5px solid var(--accent-primary);
    background: var(--bg-secondary);
    border-radius: 10px;
    color: var(--text-secondary);
    text-align: justify;
    font-size: 0.9rem;
}

.article-toc {
    margin: 0 0 2.5rem 0;
    padding: 1.5rem 1.5rem 1.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.article-toc h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.article-toc ol {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.article-toc li {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-toc a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.article-toc a:hover {
    border-bottom-color: var(--accent-primary);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.far {
    margin-right: 10px;
}

.article-content h2, 
.article-content h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-primary);
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    background: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content pre {
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
}

.article-content pre code {
    margin: 0;
    padding: 0;
    background: none;
    white-space: pre-wrap;
    word-break: break-word;
    display: block;
}

.author-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.author-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.author-avatar {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px 0;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .hero, .posts-section, .article-container, .footer-content {
        max-width: 95%; 
    }
    
    .footer-top-row {
        flex-direction: column;
        text-align: center;
    }

    .article-content {
        overflow-x: hidden;
    }

    .article-content pre {
        max-width: calc(100vw - 4rem);
        font-size: 0.85rem;
    }
}

/* Sponsors section */
.sponsors-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px dashed var(--border-color);
}

.sponsors-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.sponsor-box {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.75rem;
    border-radius: 12px;
    text-decoration: none !important;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.2s ease;
    overflow: hidden;
}

.sponsor-box:hover {
    transform: translateY(-4px);
}

/* Sponsor specific card styles */
.proton-sponsor {
    background: var(--proton-bg);
    border: 1px solid var(--proton-border);
    box-shadow: 0 4px 12px var(--proton-shadow);
}

.proton-sponsor:hover {
    border-color: var(--proton-border-hover);
    box-shadow: 0 12px 24px var(--proton-shadow);
}

.hostinger-sponsor {
    background: var(--hostinger-bg);
    border: 1px solid var(--hostinger-border);
    box-shadow: 0 4px 12px var(--hostinger-shadow);
}

.hostinger-sponsor:hover {
    border-color: var(--hostinger-border-hover);
    box-shadow: 0 12px 24px var(--hostinger-shadow);
}

.sponsor-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.3rem 0.75rem;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.proton-sponsor .sponsor-badge {
    background: var(--proton-badge-bg);
    color: var(--proton-text);
}

.hostinger-sponsor .sponsor-badge {
    background: var(--hostinger-badge-bg);
    color: var(--hostinger-text);
}

.sponsor-icon {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.proton-sponsor .sponsor-icon {
    color: var(--proton-text);
}

.hostinger-sponsor .sponsor-icon {
    color: var(--hostinger-text);
}

.sponsor-content {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.sponsor-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.sponsor-tagline {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}

.proton-sponsor .sponsor-tagline {
    color: var(--proton-text);
}

.hostinger-sponsor .sponsor-tagline {
    color: var(--hostinger-text);
}

.sponsor-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.sponsor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    color: #ffffff;
    width: 100%;
}

.proton-sponsor .sponsor-btn {
    background: var(--proton-btn-bg);
}

.proton-sponsor:hover .sponsor-btn {
    background: var(--proton-btn-hover);
}

.hostinger-sponsor .sponsor-btn {
    background: var(--hostinger-btn-bg);
}

.hostinger-sponsor:hover .sponsor-btn {
    background: var(--hostinger-btn-hover);
}

@media (max-width: 768px) {
    .sponsors-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .sponsors-section {
        margin-top: 2.5rem;
        padding-top: 2rem;
    }
}

/* Comments Section (Utterances) */
.comments-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px dashed var(--border-color);
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.utterances {
    max-width: 100% !important;
}

/* Fixes for article container spacing and title color */
.article-container {
    padding-top: 3rem;
}

.article-title {
    background: none !important;
    -webkit-text-fill-color: var(--text-secondary) !important;
    color: var(--text-secondary) !important;
}
