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

body {
    font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: #ffffff;
    color: #1e1e2a;
    line-height: 1.5;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 48px;
    height: 3px;
    background: #2563eb;
    border-radius: 4px;
}

h3 {
    font-size: 1.35rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.section-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2563eb;
    transition: 0.2s;
}

.section-link:hover {
    color: #1e40af;
}

/* ========== Fixed Navbar (with scroll effect) ========== */
.navbar {
    position: sticky;
    top: 0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-bottom: 1px solid #eef2f6;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0.9rem 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    font-weight: 500;
}

.nav-menu a {
    transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2563eb;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #1e293b;
}

/* ========== Top Banner ========== */
.top-banner {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
    padding: 10px 0;
    font-size: 0.85rem;
    text-align: center;
    color: #1e293b;
}

.top-banner a {
    color: #2563eb;
    font-weight: 500;
}

/* ========== Breadcrumbs (shared) ========== */
.breadcrumbs {
    background: #f8fafc;
    padding: 0.8rem 1rem;
    border-radius: 60px;
    margin: 1.5rem 0 1.8rem;
    display: inline-block;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #334155;
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: #94a3b8;
}

.breadcrumbs a {
    color: #2563eb;
    font-weight: 500;
}

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

.breadcrumbs [aria-current="page"] {
    color: #1e293b;
    font-weight: 600;
}

/* ========== Cards & Grids ========== */
.grid-2cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    border: 1px solid #f0f2f5;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
    border-color: #e0e7ff;
}

.card-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f1f5f9;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img img {
    transform: scale(1.03);
}

.card-content {
    padding: 1.2rem 1.2rem 1.5rem;
}

.card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background: #eef2ff;
    color: #2563eb;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 0.9rem;
    color: #4a5568;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.card-meta {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Horizontal card */
.card-horizontal {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.card-horizontal .card-img {
    flex: 0 0 140px;
    aspect-ratio: 4/3;
}

.card-horizontal .card-content {
    flex: 1;
    padding: 0.5rem 0;
}

.feature-card {
    background: #fafcff;
    border-radius: 28px;
    border-left: 4px solid #2563eb;
    padding: 1.5rem;
    transition: all 0.25s;
}

.feature-card:hover {
    background: #ffffff;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.08);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
}

/* Mini cards for category sidebar */
.mini-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.small-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 0.8rem;
}

.small-card-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
}

.small-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Pagination (static) ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 2.5rem 0 2rem;
    flex-wrap: wrap;
}

.page-item {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    font-weight: 500;
    transition: 0.2s;
    background: white;
}

.page-item.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.page-item:hover:not(.active) {
    background: #f1f5f9;
}

/* ========== Two Column Layout (category & detail) ========== */
.two-col-layout {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 2rem;
    margin: 1.5rem 0 3rem;
}

/* ========== Sidebar (shared) ========== */
.sidebar-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #eef2f6;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
}

.author-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.author-bio {
    font-size: 0.85rem;
    color: #475569;
    margin: 0.5rem 0;
}

.sidebar-list {
    list-style: none;
    margin-top: 0.8rem;
}

.sidebar-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.sidebar-list li a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: 0.2s;
}

.sidebar-list li a:hover {
    color: #2563eb;
}

.small-thumb {
    width: 55px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
}

.rec-title {
    flex: 1;
    font-weight: 500;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.date-text {
    font-size: 0.7rem;
    color: #6c757d;
    display: block;
}

.category-badge {
    background: #f1f4f9;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ========== Article Detail Styles ========== */
.article-header {
    margin-bottom: 1.5rem;
}

.article-subtitle {
    font-size: 1.2rem;
    color: #4b5563;
    margin-bottom: 1rem;
    font-weight: 400;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eef2f6;
    font-size: 0.85rem;
    color: #5b6e8c;
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.author-mini img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.author-mini span {
    font-weight: 600;
    color: #1e293b;
}

.views,
.date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-body {
    font-size: 0.985rem;
    letter-spacing: 0.2px;
    color: #171717;
    line-height: 1.75;
}

.article-body img {
    margin: 0 auto;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body h2 {
    font-size: 1.5rem;
    margin: 1.8rem 0 0.8rem;
}

.article-body h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.5rem;
}

.article-body img {
    border-radius: 20px;
    margin: 1.2rem 0;
    width: 100%;
}

.article-category {
    margin: 1.8rem 0 1rem;
}

.category-badge-large {
    background: #eef2ff;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.author-bio-box {
    background: #f9fafb;
    border-radius: 24px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    gap: 1.2rem;
    align-items: center;
    border: 1px solid #eef2f6;
}

.author-bio-box img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.author-bio-info h4 {
    margin-bottom: 0.3rem;
}

.author-bio-info p {
    font-size: 0.85rem;
    color: #4b5563;
}

.share-section {
    margin: 2rem 0;
    border-top: 1px solid #eef2f6;
    padding-top: 1.5rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.8rem;
}

.share-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
}

.share-btn:hover {
    background: #e2e8f0;
}

.comment-section {
    margin: 2.5rem 0;
    border-top: 1px solid #eef2f6;
    padding-top: 2rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 1rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-submit {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1rem 0 2rem;
}

.rel-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #f0f2f5;
    transition: all 0.2s;
}

.rel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -12px rgba(0, 0, 0, 0.08);
}

.rel-card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.rel-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rel-card-content {
    padding: 0.8rem;
}

.rel-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Author Profile Page Styles ========== */
.author-profile {
    margin: 2rem 0 3rem;
}

.profile-card {
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f2f5;
    overflow: hidden;
    padding: 2rem;
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 2rem;
}

.avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.author-title {
    flex: 1;
}

.author-title h1 {
    margin-bottom: 0.25rem;
}

.author-badge {
    display: inline-block;
    background: #eef2ff;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    border-radius: 40px;
    margin-top: 0.5rem;
}

.author-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    background: #f1f5f9;
    border-radius: 40px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.2s;
}

.social-icon:hover {
    background: #e2e8f0;
    color: #2563eb;
}

.author-bio-detailed {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3a4b;
    margin-bottom: 2rem;
}

.author-stats {
    display: flex;
    gap: 2rem;
    background: #f9fafb;
    padding: 1.2rem 1.5rem;
    border-radius: 28px;
    margin: 1.5rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 0.8rem;
    color: #5b6e8c;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

/* ========== Footer ========== */
.footer {
    background: #f9fafb;
    border-top: 1px solid #eef2f6;
    margin-top: 4rem;
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

.footer-col a:hover {
    color: #2563eb;
}

.copyright {
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
}

.copyright a {
    color: #64748b;
}

/* ========== Back to top ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1e293b;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99;
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {

    .grid-3cols,
    .grid-4cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-col-layout {
        grid-template-columns: 100%;
    }

    .related-grid,
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.4rem;
    }

    .article-meta-bar {
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .navbar {
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .grid-2cols,
    .grid-3cols,
    .grid-4cols {
        grid-template-columns: 1fr;
    }

    .card-horizontal {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-horizontal .card-img {
        width: 100%;
        flex-basis: auto;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .author-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .related-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.8rem;
    }

    .avatar-large {
        width: 120px;
        height: 120px;
    }

    .author-bio-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    h1 {
        font-size: 2rem;
    }
}