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

:root {
    --bg: #f7f7f8;
    --text: #111827;
    --muted: #6b7280;
    --muted-2: #4b5563;
    --surface: #ffffff;
    --surface-2: #eceff3;
    --border: #e5e7eb;
    --border-2: #d1d5db;
    --primary: #111827;
    --primary-hover: #374151;
    --pill-bg: #eef2ff;
    --pill-text: #3730a3;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-hero: 0 18px 40px rgba(0,0,0,0.10);
}

body.dark-mode {
    --bg: #0f172a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --surface: #111827;
    --surface-2: #1f2937;
    --border: #334155;
    --border-2: #475569;
    --primary: #f8fafc;
    --primary-hover: #e2e8f0;
    --pill-bg: #312e81;
    --pill-text: #e0e7ff;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.25);
    --shadow-hero: 0 18px 40px rgba(0,0,0,0.30);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body.dark-mode .site-header {
    background: rgba(15, 23, 42, 0.55);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

body.dark-mode .site-header.scrolled {
    background: rgba(15, 23, 42, 0.85);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.brand h1 {
    font-size: 32px;
    margin-bottom: 4px;
}

.brand p {
    font-size: 14px;
    color: var(--muted);
}

.site-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    color: var(--text);
    padding: 10px 16px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.site-nav a:hover {
    background-color: var(--surface-2);
}

.theme-toggle {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-2);
    background-color: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
}

.theme-toggle:hover {
    background-color: var(--surface-2);
}

.main-content {
    padding: 70px 0;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-badge,
.section-badge {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--muted);
    margin-bottom: 16px;
}

.section-badge {
    margin-bottom: 24px;
    display: inline-block;
}

.hero-text h2 {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 22px;
}

.hero-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--muted-2);
    max-width: 550px;
}

.hero-buttons {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 24px;
    border-radius: 16px;
    font-size: 16px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transition: background-color 0.2s ease;
}

.btn-secondary {
    background-color: var(--surface);
    border: 1px solid var(--border-2);
    color: var(--text);
}

.btn-secondary:hover {
    background-color: var(--surface-2);
    transition: background-color 0.2s ease;
}

.hero-card {
    background-color: var(--surface);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-hero);
    position: relative;
    min-height: 420px;
}

.hero-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0.22), rgba(0,0,0,0.05));
    display: flex;
    align-items: flex-end;
    padding: 28px;
}

.hero-overlay-content .catergory-pill {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    color: white;
    font-size: 13px;
    margin-bottom: 12px;
    backdrop-filter: blur(8px);
}

.hero-overlay-content h3 {
    color: white;
    font-size: 25px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.hero-overlay-content p {
    color: rgba(255,255,255,0.88);
    font-size: 15px;
    line-height: 1.6;
}

.articles-section {
    margin-top: 50px;
}

.section-top {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.section-title h3 {
    font-size: 24px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.post-count {
    background: var(--surface-2);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: bold;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: start;
}

.search-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) auto;
    gap: 16px;
    margin-bottom: 26px;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border-2);
    border-radius: 18px;
    font-size: 16px;
    outline: none;
    background-color: var(--surface);
    color: var(--text);
}

.search-input:focus {
    border-color: var(--text);
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.filter-btn {
    padding: 10px 14px;
    border: 1px solid var(--border-2);
    background-color: var(--surface);
    color: var(--text);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-btn:hover {
    background-color: var(--surface-2);
}

.filter-btn.active {
    background-color: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.article-card {
    background: var(--surface);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-category {
    display: inline-block;
    background: var(--pill-bg);
    color: var(--pill-text);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.article-slug {
    color: var(--muted);
    font-size: 12px;
}

.article-content h4 {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 14px;
}

.article-content .excerpt {
    color: var(--muted-2);
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.article-meta i {
    margin-right: 6px;
}

.article-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: auto;
}

.social-meta {
    display: flex;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.like-btn:hover {
    color: #ef4444;
}

.like-btn.liked {
    color: #ef4444;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.small-btn {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 14px;
}

.read-more-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.recent-posts {
    background: var(--surface);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 96px;
    margin-left: auto;
    width: 100%;
    max-width: 360px;
}

.recent-posts h4 {
    font-size: 20px;
    margin-bottom: 18px;
}

.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recent-post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-thumb {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-post-info h5 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.recent-post-info p {
    font-size: 12px;
    color: var(--muted);
}

.recent-post-link {
    text-decoration: none;
    color: inherit;
}

.recent-post-link:hover h5 {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.pagination-btn {
    padding: 10px 16px;
    border: 1px solid var(--border-2);
    background-color: var(--surface);
    color: var(--text);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
}

.pagination-btn:hover {
    background-color: var(--surface-2);
}

.pagination-btn.active {
    background-color: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 24px;
    margin-top: 60px;
}

.site-footer p {
    font-size: 14px;
    color: var(--muted);
}

.footer-links-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.back-btn i {
    font-size: 14px;
}

.full-article-content h2 {
    font-size: 42px;
    line-height: 1.1;
    margin-bottom: 18px;
}

.full-like-row {
    margin-top: 10px;
}

.full-article-text {
    margin-top: 28px;
}

.full-article-text p {
    color: var(--muted-2);
    font-size: 17px;
    line-height: 1.9;
    margin-bottom: 18px;
}

.article-subheading {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.3;
    margin-top: 34px;
    margin-bottom: 16px;
    color: var(--text);
}

.article-list {
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 24px;
    color: var(--muted-2);
}

.article-list li {
    margin-bottom: 10px;
    line-height: 1.8;
    font-size: 17px;
}

.no-results {
    background: var(--surface);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    box-shadow: var(--shadow-soft);
}

.about-page,
.contact-page,
.privacy-page,
.article-page {
    padding-top: 30px;
    padding-bottom: 40px;
}

.about-hero-card,
.contact-hero-card,
.privacy-hero-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 36px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 28px;
}

.about-hero-card h2,
.contact-hero-card h2,
.privacy-hero-card h2 {
    font-size: 42px;
    line-height: 1.1;
    margin-bottom: 18px;
    max-width: 900px;
}

.about-intro,
.contact-intro,
.privacy-intro {
    font-size: 18px;
    line-height: 1.8;
    color: var(--muted-2);
    max-width: 900px;
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.about-main-card,
.about-sidebar-card,
.contact-main-card,
.contact-sidebar-card,
.privacy-main-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
}

.about-main-card h3,
.about-sidebar-card h4,
.contact-main-card h3,
.contact-sidebar-card h4,
.privacy-main-card h3 {
    font-size: 24px;
    margin-bottom: 14px;
    color: var(--text);
}

.about-main-card p,
.about-sidebar-card p,
.contact-main-card p,
.contact-sidebar-card p,
.privacy-main-card p {
    color: var(--muted-2);
    line-height: 1.9;
    font-size: 17px;
    margin-bottom: 18px;
}

.about-main-card h3:not(:first-child),
.about-sidebar-card h4:not(:first-child),
.contact-main-card h3:not(:first-child),
.contact-sidebar-card h4:not(:first-child),
.privacy-main-card h3:not(:first-child) {
    margin-top: 24px;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.about-tag {
    display: inline-block;
    background: var(--pill-bg);
    color: var(--pill-text);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.contact-email-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 18px;
    margin-bottom: 18px;
    font-weight: bold;
    transition: 0.2s ease;
}

.contact-email-card:hover {
    background: var(--surface);
}

.contact-email-card i {
    font-size: 18px;
}

.single-article-card {
    background: var(--surface);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.single-article-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.single-article-content {
    padding: 32px;
}

.single-article-content h1 {
    font-size: 42px;
    line-height: 1.1;
    margin-top: 18px;
    margin-bottom: 18px;
}

.back-link {
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.single-article-error {
    color: var(--muted-2);
    font-size: 17px;
    line-height: 1.8;
    margin-top: 12px;
}


@media (max-width: 1100px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .recent-posts {
        position: static;
        margin-left: 0;
        max-width: 100%;
    }
}

@media (max-width: 1000px) {
    .hero,
    .articles-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-text h2 {
        font-size: 42px;
    }

    .about-hero-card h2,
    .contact-hero-card h2,
    .privacy-hero-card h2 {
        font-size: 34px;
    }
}

.lesson-label {
    display: inline-block;
    background: var(--primary);
    color: var(--bg);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.article-highlight {
    display: block;
    background: var(--surface-2);
    border-left: 5px solid var(--primary);
    padding: 18px 20px;
    border-radius: 16px;
    margin: 24px 0;
    font-weight: 700;
    color: var(--text);
    line-height: 1.8;
}

.key-point {
    display: block;
    background: #eef2ff;
    color: #1e1b4b;
    border: 1px solid #c7d2fe;
    padding: 18px 20px;
    border-radius: 18px;
    margin: 22px 0;
    line-height: 1.8;
}

.comparison-box {
    display: block;
    background: #f8fafc;
    color: #111827;
    border: 1px solid #d1d5db;
    padding: 16px 18px;
    border-radius: 16px;
    margin: 16px 0;
    line-height: 1.8;
}

.quiz-box {
    display: block;
    background: #ecfdf5;
    color: #064e3b;
    border: 1px solid #a7f3d0;
    padding: 18px 20px;
    border-radius: 18px;
    margin: 18px 0;
    line-height: 1.8;
}

body.dark-mode .key-point {
    background: #1e1b4b;
    color: #e0e7ff;
    border-color: #4338ca;
}

body.dark-mode .comparison-box {
    background: #1f2937;
    color: #f8fafc;
    border-color: #475569;
}

body.dark-mode .quiz-box {
    background: #052e1f;
    color: #d1fae5;
    border-color: #047857;
}

.think-box {
    display: block;
    background: #fff7ed;
    color: #7c2d12;
    border: 1px solid #fed7aa;
    padding: 18px 20px;
    border-radius: 18px;
    margin: 22px 0;
    line-height: 1.8;
}

.try-box {
    display: block;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    padding: 18px 20px;
    border-radius: 18px;
    margin: 22px 0;
    line-height: 1.8;
}

.warning-box {
    display: block;
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
    padding: 18px 20px;
    border-radius: 18px;
    margin: 22px 0;
    line-height: 1.8;
}

.example-box {
    display: block;
    background: #f5f3ff;
    color: #3b0764;
    border: 1px solid #ddd6fe;
    padding: 18px 20px;
    border-radius: 18px;
    margin: 22px 0;
    line-height: 1.8;
}

.check-box {
    display: block;
    background: #f0fdf4;
    color: #14532d;
    border: 1px solid #bbf7d0;
    padding: 18px 20px;
    border-radius: 18px;
    margin: 22px 0;
    line-height: 1.8;
}

body.dark-mode .think-box {
    background: #431407;
    color: #fed7aa;
    border-color: #c2410c;
}

body.dark-mode .try-box {
    background: #172554;
    color: #bfdbfe;
    border-color: #2563eb;
}

body.dark-mode .warning-box {
    background: #450a0a;
    color: #fecaca;
    border-color: #dc2626;
}

body.dark-mode .example-box {
    background: #2e1065;
    color: #ddd6fe;
    border-color: #7c3aed;
}

body.dark-mode .check-box {
    background: #052e16;
    color: #bbf7d0;
    border-color: #16a34a;
}

@media (max-width: 760px) {
    .hero-text h2 {
        font-size: 34px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title h3 {
        font-size: 28px;
    }

    .btn {
        width: 100%;
    }

    .card-actions {
        width: 100%;
        flex-direction: column;
    }

    .search-filter-row {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

    .full-article-content h2,
    .single-article-content h1 {
        font-size: 32px;
    }

    .article-subheading {
        font-size: 24px;
    }

    .article-list li,
    .full-article-text p,
    .privacy-main-card p,
    .about-main-card p,
    .contact-main-card p,
    .about-sidebar-card p,
    .contact-sidebar-card p {
        font-size: 16px;
    }

    .single-article-image {
        height: 280px;
    }
}

@media (max-width: 760px) {
    .site-header {
        position: static;
        top: auto;
    }
}

@media (max-width: 1000px) {
    .site-header {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 1200px) {
    .site-header {
        position: static !important;
        top: auto !important;
    }
}