:root {
    --primary-color: #1a365d;
    --accent-color: #ed8936;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ============================================
   Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

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

ul,
ol {
    list-style: none;
}

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

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

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: color 0.2s;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--accent-color);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav-menu li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb-wrapper {
    background: var(--bg-light);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 0.5rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-color);
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.breadcrumb .current {
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   Layout
   ============================================ */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.main-content {
    min-width: 0;
}

/* ============================================
   Cards
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.listing-card {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.25s, box-shadow 0.3s;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.listing-card-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.listing-card-content {
    padding: 1.25rem;
}

.card-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.15rem;
    line-height: 1.4;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: var(--text-color);
}

.card-title a:hover {
    color: var(--accent-color);
}

.card-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-meta i {
    font-size: 0.9rem;
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: inline-block;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar-widget {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.author-box {
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--accent-color);
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.author-name a {
    color: var(--primary-color);
}

.author-name a:hover {
    color: var(--accent-color);
}

.author-bio {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.widget-title span {
    display: inline-block;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
}

.sidebar-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-list a {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}

.sidebar-list a:hover {
    color: var(--accent-color);
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trending-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.trending-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
}

.trending-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-title a {
    color: var(--text-color);
}

.trending-title a:hover {
    color: var(--accent-color);
}

/* ============================================
   Pagination
   ============================================ */
.pagination-wrapper {
    margin-top: 2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination li {
    list-style: none;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--bg-light);
    border-color: var(--accent-color);
}

.page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-link.prev-next {
    padding: 0 1rem;
    gap: 0.25rem;
}

.page-dots {
    border: none;
    background: transparent;
    cursor: default;
}

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

.article-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.article-meta-top {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.author-mini:hover {
    color: var(--accent-color);
}

.author-mini .author-thumb {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

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

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

.article-body h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.article-body h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1rem auto;
}

.author-bio-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--border-color);
}

.author-bio-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.author-bio-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.author-bio-info h4 a {
    color: var(--primary-color);
}

.author-bio-info h4 a:hover {
    color: var(--accent-color);
}

.author-bio-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ============================================
   Share Buttons
   ============================================ */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn i {
    font-size: 1.1rem;
    color: white;
}

.share-btn[data-platform="twitter"] {
    background: #1da1f2;
}

.share-btn[data-platform="facebook"] {
    background: #4267b2;
}

.share-btn[data-platform="linkedin"] {
    background: #0077b5;
}

.share-btn[data-platform="pinterest"] {
    background: #bd081c;
}

/* ============================================
   Related Articles
   ============================================ */
.related-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-section h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

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

.related-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.related-card-content {
    padding: 1rem;
}

.related-card-content h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-content h4 a {
    color: var(--text-color);
}

.related-card-content h4 a:hover {
    color: var(--accent-color);
}

.related-card-content .meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* ============================================
   Author Page
   ============================================ */
.author-hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.author-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid var(--accent-color);
}

.author-name-large {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.author-bio-short {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.author-detail-body {
    margin-bottom: 2.5rem;
    line-height: 1.75;
}

.author-detail-body p {
    margin-bottom: 1rem;
}

.articles-section {
    margin-top: 2rem;
}

.articles-section h2 {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.author-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.article-card-sm {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card-sm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.article-card-sm h3 {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-sm h3 a {
    color: var(--text-color);
}

.article-card-sm h3 a:hover {
    color: var(--accent-color);
}

.article-card-sm .meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--primary-color);
    padding: 2.5rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .two-columns {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }

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

@media (max-width: 768px) {
    .site-header {
        position: relative;
    }

    .nav-container {
        height: 55px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 55px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 55px);
        background: var(--bg-color);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 999;
        padding: 1.5rem;
    }

    .main-nav.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu li a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        display: block;
    }

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

    .sidebar {
        order: 2;
    }

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

    .article-header h1 {
        font-size: 1.4rem;
    }

    .article-meta-top {
        flex-wrap: nowrap;
        font-size: 0.85rem;
        gap: 0.75rem;
    }

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

    .breadcrumb-wrapper {
        display: none;
    }

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

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.4rem;
        line-height: 1.35;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .author-hero {
        padding: 1.5rem 1rem;
    }

    .author-name-large {
        font-size: 1.5rem;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

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

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}