/* DumbPrime - Main Styles */

:root {
    --blue-900: #0f172a;
    --blue-800: #1e293b;
    --blue-700: #334155;
    --blue-600: #475569;
    --blue-500: #64748b;
    --blue-400: #94a3b8;
    --blue-300: #cbd5e1;
    --blue-200: #e2e8f0;
    --blue-100: #f1f5f9;
    --blue-50: #f8fafc;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-light: #3b82f6;
    --paper: #fffef9;
    --ink: #1a1a1a;
    --ink-light: #4a4a4a;
    --border: #e5e5e5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--blue-50);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

/* Top Bar */
.top-bar {
    background: var(--blue-900);
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    color: var(--blue-400);
}

.top-bar a {
    color: var(--blue-300);
    text-decoration: none;
    margin-left: 1.5rem;
}

.top-bar a:hover {
    color: white;
}

/* Navigation */
nav {
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-mark {
    width: 36px;
    height: 36px;
    background: var(--blue-900);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Spectral', serif;
    font-size: 1.4rem;
    font-weight: 500;
    font-style: italic;
    color: white;
}

.logo-text {
    font-family: 'Spectral', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--blue-900);
}

.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 2px solid var(--blue-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nav-search::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.5;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--ink-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.nav-auth {
    display: flex;
    gap: 0.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--blue-300);
    color: var(--ink-light);
    padding: 0.45rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-solid {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: white;
    padding: 0.45rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-solid:hover {
    background: var(--accent-dark);
}

/* Hero + Articles Combined Section */
.hero-articles {
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 100%);
    padding: 2.5rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero-articles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-articles-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Compact Hero Row */
.hero-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero-text h1 {
    font-family: 'Spectral', serif;
    font-size: 2rem;
    font-weight: 600;
    color: white;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-text h1 span {
    color: var(--accent-light);
}

.hero-text p {
    font-size: 1rem;
    color: var(--blue-300);
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
}

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

.hero-stat-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--blue-400);
}

/* Featured Articles Grid */
.featured-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.featured-label h2 {
    font-family: 'Spectral', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-label h2::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
}

.view-all-hero {
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.2s;
}

.view-all-hero:hover {
    gap: 0.6rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.25rem;
}

.featured-card {
    background: var(--paper);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.featured-card.large {
    grid-row: span 2;
}

.featured-card.large .card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-card.large .card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.featured-card.large .card-excerpt {
    flex: 1;
    margin-bottom: 1rem;
}

.card-image {
    height: 100px;
    background: linear-gradient(135deg, var(--blue-200) 0%, var(--blue-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Spectral', serif;
    font-size: 2.5rem;
    color: var(--blue-500);
}

.featured-card.large .card-image {
    height: 160px;
    font-size: 4rem;
}

.card-content {
    padding: 1rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.card-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 4px;
}

.card-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--blue-500);
}

.card-title {
    font-family: 'Spectral', serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    color: var(--ink);
    transition: color 0.2s;
}

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

.card-excerpt {
    font-size: 0.85rem;
    color: var(--ink-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card.large .card-excerpt {
    -webkit-line-clamp: 4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.card-read-time {
    font-size: 0.75rem;
    color: var(--blue-500);
}

.card-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

/* Categories */
.categories {
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.categories-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.category-btn {
    background: var(--blue-100);
    border: none;
    padding: 0.4rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-light);
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--accent);
    color: white;
}

/* More Articles Grid */
.more-articles {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.more-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.more-articles-header h2 {
    font-family: 'Spectral', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blue-500);
    font-size: 0.85rem;
}

.sort-dropdown select {
    border: 1px solid var(--border);
    padding: 0.4rem 0.6rem;
    font-family: inherit;
    font-size: 0.85rem;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

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

.article-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: var(--accent);
}

.article-image {
    height: 120px;
    background: linear-gradient(135deg, var(--blue-200) 0%, var(--blue-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Spectral', serif;
    font-size: 2rem;
    color: var(--blue-500);
    position: relative;
}

.article-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.article-card:hover .article-image::after {
    transform: scaleX(1);
}

.article-body {
    padding: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.article-tag {
    background: var(--blue-100);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 4px;
}

.article-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--blue-500);
}

.article-title {
    font-family: 'Spectral', serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.article-excerpt {
    font-size: 0.8rem;
    color: var(--ink-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.article-read-time {
    font-size: 0.7rem;
    color: var(--blue-500);
}

.article-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-link:hover {
    text-decoration: underline;
}

/* Paywall button - styled to match article-link */
.article-link-button {
    background: none;
    border: none;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.article-link-button:hover {
    text-decoration: underline;
}

/* Load More */
.load-more {
    text-align: center;
    margin-top: 2rem;
}

.btn-load {
    background: white;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.75rem 2rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load:hover {
    background: var(--accent);
    color: white;
}

/* About Section */
.about {
    background: var(--blue-100);
    padding: 4rem 2rem;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-family: 'Spectral', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1rem;
    color: var(--ink-light);
    margin-bottom: 1rem;
}

.about-quote {
    font-family: 'Spectral', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--accent);
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    background: white;
}

.about-quote cite {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--ink-light);
    margin-top: 0.75rem;
    font-family: 'Source Sans 3', sans-serif;
}

/* Newsletter */
.newsletter {
    background: var(--blue-900);
    padding: 3.5rem 2rem;
}

.newsletter-content {
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h3 {
    font-family: 'Spectral', serif;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 0.75rem;
}

.newsletter p {
    color: var(--blue-300);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 420px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.newsletter-form input:focus {
    outline: 2px solid var(--accent);
}

.newsletter-form button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 0.875rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Footer */
footer {
    background: var(--blue-800);
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand p {
    color: var(--blue-400);
    font-size: 0.9rem;
    margin-top: 0.75rem;
    max-width: 280px;
}

.footer-section h4 {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--blue-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--blue-700);
    display: flex;
    justify-content: space-between;
    color: var(--blue-500);
    font-size: 0.8rem;
}

/* Page Header (for inner pages) */
.page-header {
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.page-header h1 {
    font-family: 'Spectral', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--blue-300);
    font-size: 1.1rem;
}

/* Content Section */
.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content-section h2 {
    font-family: 'Spectral', serif;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--ink);
}

.content-section p {
    margin-bottom: 1.5rem;
    color: var(--ink-light);
}

/* Responsive */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: 1fr 1fr;
    }

    .featured-card.large {
        grid-row: span 1;
    }

    .featured-card.large .card-image {
        height: 120px;
    }

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

@media (max-width: 1024px) {
    .hero-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-search {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .nav-auth {
        display: none;
    }

    .hamburger {
        display: flex !important;
    }

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

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

    .newsletter-form {
        flex-direction: column;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .top-bar-content {
        font-size: 0.7rem;
        padding: 0 1rem;
    }

    .top-bar a {
        margin-left: 0.75rem;
    }

    .nav-content {
        padding: 0.75rem 1rem;
    }
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

.mobile-menu-links {
    list-style: none;
    text-align: center;
    margin-bottom: 2rem;
}

.mobile-menu-links li {
    margin: 1.5rem 0;
}

.mobile-menu-links a {
    font-family: 'Spectral', serif;
    font-size: 1.75rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-menu-links a:hover {
    color: var(--accent-light);
}

.mobile-menu-auth {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 280px;
}

.mobile-menu-auth .btn-outline {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    text-align: center;
    border-color: var(--blue-400);
    color: white;
}

.mobile-menu-auth .btn-outline:hover {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

.mobile-menu-auth .btn-solid {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    text-align: center;
}

@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }

    .hamburger {
        display: none !important;
    }
}

/* ============================================
   ARTICLE PAGE STYLES
   ============================================ */

.article-page {
    background: var(--paper);
}

.article-header {
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 100%);
    padding: 3rem 2rem 4rem;
    position: relative;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.article-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.article-breadcrumb {
    font-size: 0.85rem;
    color: var(--blue-400);
    margin-bottom: 1.5rem;
}

.article-breadcrumb a {
    color: var(--blue-300);
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: white;
    text-decoration: underline;
}

.article-header h1 {
    font-family: 'Spectral', serif;
    font-size: 2.25rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-summary {
    font-size: 1.1rem;
    color: var(--blue-300);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.article-info .article-tag {
    background: rgba(37, 99, 235, 0.2);
    color: var(--accent-light);
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 4px;
}

.article-info .article-date,
.article-info .article-read-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--blue-400);
}

/* Article Content */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.article-content h2 {
    font-family: 'Spectral', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ink);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blue-200);
}

.article-content h2:first-of-type {
    margin-top: 0;
}

.article-content h3 {
    font-family: 'Spectral', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink-light);
    margin-bottom: 1.25rem;
}

.article-content strong {
    color: var(--ink);
    font-weight: 600;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--ink-light);
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* PDF Download Box */
.pdf-download-box {
    background: linear-gradient(135deg, var(--blue-100) 0%, var(--blue-200) 100%);
    border: 1px solid var(--blue-300);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.pdf-download-box h3 {
    font-family: 'Spectral', serif;
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.pdf-download-box p {
    font-size: 0.95rem;
    color: var(--ink-light);
    margin-bottom: 1rem;
}

.btn-download {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-download:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Code Blocks */
.code-block {
    background: var(--blue-900);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.5rem 0 2rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--blue-800);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--blue-700);
}

.code-header span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--blue-400);
}

.copy-btn {
    background: var(--blue-700);
    border: none;
    color: var(--blue-300);
    padding: 0.35rem 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
}

.code-block pre {
    padding: 1.25rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--blue-200);
    white-space: pre;
}

/* Article Source */
.article-source {
    background: var(--blue-50);
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    margin-top: 3rem;
    border-radius: 0 8px 8px 0;
}

.article-source h3 {
    font-family: 'Spectral', serif;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.article-source p {
    font-size: 0.95rem;
    color: var(--ink-light);
    margin: 0;
}

.article-source a {
    color: var(--accent);
    text-decoration: none;
}

.article-source a:hover {
    text-decoration: underline;
}

/* Related Articles */
.related-articles {
    background: var(--blue-50);
    padding: 4rem 2rem;
}

.related-articles-content {
    max-width: 1200px;
    margin: 0 auto;
}

.related-articles h2 {
    font-family: 'Spectral', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--ink);
}

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

/* Article page responsive */
@media (max-width: 768px) {
    .article-header {
        padding: 2rem 1.5rem 3rem;
    }

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

    .article-content {
        padding: 2rem 1.5rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .pdf-download-box {
        padding: 1.25rem;
    }

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

/* Rich text images from Webflow */
.article-content figure {
    margin: 2rem 0;
    text-align: center;
}

.article-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-content figure.w-richtext-align-center {
    display: flex;
    justify-content: center;
}

.article-content figure.w-richtext-align-center img {
    max-width: 600px;
}

/* Inline code */
.article-content code:not(pre code) {
    background: var(--blue-100);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    color: var(--accent-dark);
}

/* External Link Cards */
.external-link-card {
    display: block;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.external-link-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.external-link-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.external-link-card:hover::before {
    opacity: 1;
}

.external-link-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.external-link-title {
    font-family: 'Spectral', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    line-height: 1.3;
}

.external-link-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--blue-400);
    transition: color 0.2s ease;
}

.external-link-card:hover .external-link-icon {
    color: var(--accent);
}

.external-link-description {
    font-size: 0.95rem;
    color: var(--ink-light);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.external-link-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--blue-500);
}

.external-link-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.external-link-domain {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    background: var(--blue-100);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.external-link-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
}

/* External links grid for multiple links */
.external-links-grid {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .external-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .external-links-grid .external-link-card {
        margin: 0;
    }
}

/* Make inline links in article content more visible */
.article-content p a:not(.external-link-card):not(.btn-download) {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.article-content p a:not(.external-link-card):not(.btn-download):hover {
    text-decoration-color: var(--accent);
    background: rgba(37, 99, 235, 0.1);
    padding: 0 0.2rem;
    margin: 0 -0.2rem;
    border-radius: 3px;
}

/* Math blocks with KaTeX */
.math-block {
    background: var(--blue-50);
    border-left: 4px solid var(--accent);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    overflow-x: auto;
}

.math-block.highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-left-color: var(--accent-dark);
}

.math-block p {
    margin-bottom: 1rem;
}

.math-block p:last-child {
    margin-bottom: 0;
}

/* KaTeX display math centering */
.katex-display {
    margin: 1rem 0 !important;
    text-align: center;
}

.katex {
    font-size: 1.1em;
}
