@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Light Theme Palette */
    --primary: #00548f;
    --primary-dark: #07395f;
    --primary-light: #0077c8;
    --accent: #24b34b;
    --accent-dark: #13823b;
    --accent-light: #3be268;
    --accent-bg: rgba(36, 179, 75, 0.08);

    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-soft: #f1f5f9;
    --bg-warm: #fffbf0;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(7, 57, 95, 0.08), 0 8px 10px -6px rgba(7, 57, 95, 0.04);
    --shadow-lg: 0 20px 35px -10px rgba(7, 57, 95, 0.14), 0 10px 15px -5px rgba(7, 57, 95, 0.06);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --header-bg: rgba(255, 255, 255, 0.85);
    --header-blur: 16px;
    --reading-progress: #24b34b;
}

[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-dark: #0284c7;
    --primary-light: #7dd3fc;
    --accent: #4ade80;
    --accent-dark: #22c55e;
    --accent-light: #86efac;
    --accent-bg: rgba(74, 222, 128, 0.12);

    --bg-page: #0b1320;
    --bg-surface: #131f33;
    --bg-surface-elevated: #1a2942;
    --bg-soft: #1e2d45;
    --bg-warm: #1e2738;

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --border-color: #24344d;
    --border-hover: #334666;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.6);

    --header-bg: rgba(19, 31, 51, 0.85);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;
    background-color: var(--bg-page);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 84, 143, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(36, 179, 75, 0.03) 0%, transparent 40%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.65;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    z-index: 100;
    transition: width 0.1s ease-out;
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand img {
    height: 38px;
    width: auto;
    display: block;
}

.brand-badge {
    padding: 4px 10px;
    border-left: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.94rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: var(--bg-soft);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

/* Page Layout Container */
.page {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0 40px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.kicker::before {
    content: "";
    width: 24px;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

h1 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-copy {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 620px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.button.accent {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button.primary:hover {
    box-shadow: 0 12px 28px rgba(0, 84, 143, 0.25);
}

/* Featured Card Hero */
.featured-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 45px -12px rgba(7, 57, 95, 0.2);
}

.featured-banner {
    min-height: 240px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(135deg, #07395f 0%, #00548f 60%, #24b34b 100%);
    color: #ffffff;
    position: relative;
}

.featured-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 70%);
}

.featured-banner h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    position: relative;
    z-index: 2;
}

.featured-body {
    padding: 28px;
}

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--accent-bg);
    color: var(--accent-dark);
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(36, 179, 75, 0.25);
}

[data-theme="dark"] .tag {
    color: var(--accent);
}

.featured-body h2 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 1.6rem;
    line-height: 1.25;
    margin-bottom: 10px;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

/* Control Bar (Search & Filter) */
.controls-section {
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
}

.controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 480px;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 46px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 84, 143, 0.15);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 36px;
    padding: 30px 0 80px;
}

.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.post-card h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 1.3rem;
    line-height: 1.25;
    margin: 12px 0 10px;
}

.post-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--bg-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.card-footer svg {
    transition: transform 0.2s ease;
}

.post-card:hover .card-footer svg {
    transform: translateX(4px);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget.accent-widget {
    background: var(--bg-warm);
    border-color: rgba(255, 179, 64, 0.4);
}

[data-theme="dark"] .widget.accent-widget {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color);
}

.topic-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.topic-item:hover {
    background: var(--bg-soft);
    color: var(--primary);
}

.topic-count {
    background: var(--bg-soft);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.newsletter-form input {
    height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
}

.newsletter-form button {
    height: 44px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* Single Article Layout */
.article-header {
    padding: 50px 0 30px;
    max-width: 860px;
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.article-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.08;
    margin: 16px 0;
}

.article-lead {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.author-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.article-cover {
    width: 100%;
    min-height: 320px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #07395f 0%, #00548f 50%, #13823b 100%);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-end;
    padding: 36px;
    margin: 32px 0 48px;
    color: #ffffff;
}

.article-cover h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    max-width: 750px;
}

/* Article Body Grid */
.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 760px) 320px;
    gap: 48px;
    padding-bottom: 80px;
}

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

.article-content p {
    margin-bottom: 24px;
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 44px 0 16px;
    color: var(--text-main);
    line-height: 1.25;
    scroll-margin-top: 100px;
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 32px 0 12px;
    color: var(--text-main);
    scroll-margin-top: 100px;
}

.article-content ul, 
.article-content ol {
    margin: 0 0 28px 24px;
}

.article-content li {
    margin-bottom: 10px;
}

.quote-box {
    margin: 36px 0;
    padding: 24px 28px;
    border-left: 5px solid var(--accent);
    background: var(--bg-surface-elevated);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.45;
}

.checklist-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 32px 0;
}

.check-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.check-num {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.cta-box {
    margin-top: 48px;
    padding: 36px;
    background: linear-gradient(135deg, var(--primary-dark), #031b2e);
    border-radius: var(--radius-lg);
    color: #ffffff;
    box-shadow: var(--shadow-lg);
}

.cta-box h3 {
    color: #ffffff;
    font-size: 1.7rem;
    margin-bottom: 10px;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

/* Floating Share Bar */
.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-main);
    color: var(--bg-page);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 40px 0;
    margin-top: auto;
}

.footer-inner {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Rules */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 0 20px;
    }

    .content-grid,
    .article-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .posts-list {
        grid-template-columns: 1fr;
    }

    .article-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
