/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', 'SF Mono', 'Roboto Mono', monospace;
    color: #2c3e50;
    background: #fefefe;
    /* Ultra-subtle graph paper pattern using CSS gradients */
    background-image: 
        linear-gradient(rgba(248, 250, 251, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 250, 251, 0.4) 1px, transparent 1px);
    background-size: 20px 20px;
    line-height: 1.7;
    font-weight: 400;
    position: relative;
}

/* Extremely subtle coffee stain effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 85% 15%, rgba(139, 69, 19, 0.005) 0%, transparent 20%),
                radial-gradient(circle at 15% 85%, rgba(160, 82, 45, 0.003) 0%, transparent 15%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e1e8ed;
    position: static;
    backdrop-filter: blur(2px);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

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

.site-title {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: -0.02em;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.brand-link {
    text-decoration: none;
    color: inherit;
}
.brand-subtitle {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.2rem;
}

.main-nav {
    display: flex;
    gap: 2rem;
    font-family: 'Courier New', 'Monaco', monospace;
}

.nav-link {
    text-decoration: none;
    color: #34495e;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    /* Match tag styling */
    background: #ecf0f1;
}

.nav-link:hover,
.nav-link.active {
    background: #3498db;
    color: white;
}

/* Home Page Styles */
.home-page {
    padding: 3rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.hero-title {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.8), 
                 1px 1px 0 rgba(52, 73, 94, 0.1);
}

.hero-subtitle {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid #3498db;
    display: inline-block;
    padding-bottom: 0.5rem;
}
.hero-description {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.focus-areas {
    margin-top: 2rem;
}

.focus-areas h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.focus-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.focus-item {
    background: #ecf0f1;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #34495e;
}

/* Content Grid */
.recent-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
/* Content Cards */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
    position: relative;
    /* Engineering blueprint style */
    box-shadow: 3px 3px 8px rgba(0,0,0,0.08), 
                inset 1px 1px 0 rgba(255,255,255,0.9),
                0 0 0 1px rgba(52, 73, 94, 0.1);
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(248, 249, 250, 0.8), rgba(233, 236, 239, 0.4));
    border-radius: 4px;
    z-index: -1;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 12px rgba(0,0,0,0.12),
                inset 1px 1px 0 rgba(255,255,255,0.95),
                0 0 0 2px rgba(52, 73, 94, 0.15);
    border-color: #34495e;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.card-type {
    background: #3498db;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-date {
    color: #7f8c8d;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card-title a {
    color: #2c3e50;
    text-decoration: none;
}

.card-title a:hover {
    color: #3498db;
}

.card-summary {
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #ecf0f1;
    color: #34495e;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.tag:hover {
    background: #3498db;
    color: white;
}

.view-more {
    text-align: center;
    margin-top: 2rem;
}

.btn-link {
    display: inline-block;
    margin: 0 1rem;
    padding: 0.3rem 0.8rem;
    background: #ecf0f1;
    color: #34495e;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-link:hover {
    background: #3498db;
    color: white;
}

/* Content Pages */
.content-page,
.single-content {
    padding: 3rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.content-list {
    margin-bottom: 3rem;
}

.content-item {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.item-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.item-title a {
    color: #2c3e50;
    text-decoration: none;
}

.item-title a:hover {
    color: #3498db;
}

.item-summary {
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.item-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Single Content */
.content-header {
    margin-bottom: 3rem;
}

.content-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.content-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.content-description {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.content-body {
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    color: #2c3e50;
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

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

.content-body ul,
.content-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.content-body blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #7f8c8d;
    font-style: italic;
}

.content-body code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9em;
}

.content-body pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 2rem 0;
}

.content-body pre code {
    background: none;
    padding: 0;
}

.content-navigation {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border-top: 1px solid #e1e8ed;
    padding-top: 2rem;
}

.nav-prev,
.nav-next {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.nav-title {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.nav-title:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 1rem 0;
}

.pagination-link {
    background: #ecf0f1;
    color: #34495e;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination-link:hover {
    background: #3498db;
    color: white;
}

.pagination-info {
    color: #7f8c8d;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-description {
    font-size: 0.9rem;
    color: #bdc3c7;
    max-width: 600px;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .focus-list {
        justify-content: flex-start;
    }
}

/* Search Styles */
.search-box {
    max-width: 600px;
    margin: 2rem auto;
}

.search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-family: inherit;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-results {
    margin-top: 2rem;
}

.search-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(2px);
}

.search-item h3 {
    margin-bottom: 0.5rem;
}

.search-item h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.search-item h3 a:hover {
    color: #3498db;
}

.search-item .item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
    align-items: center;
    flex-wrap: wrap;
}

.search-item .item-type {
    background: #3498db;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
}

.search-item .item-tags {
    display: flex;
    gap: 0.5rem;
}

.search-item .item-summary {
    color: #7f8c8d;
    line-height: 1.6;
}

/* Tag Pages */
.tag-page, .tags-page {
    padding: 3rem 0;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.tag-cloud-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.tag-cloud-item:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.tag-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.tag-count {
    font-size: 0.9rem;
    opacity: 0.8;
}

.recent-tags h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.popular-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.popular-tag {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popular-tag:hover {
    background: #3498db;
    color: white;
    transform: translateX(5px);
}

.tag-navigation {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e8ed;
}

/* Cross-post Styling */
.crosspost-notice {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.crosspost-label {
    background: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.external-source {
    font-style: italic;
    color: #2c3e50;
}

.canonical-notice {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid #f39c12;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.canonical-notice a {
    color: #d68910;
    text-decoration: underline;
}

.crosspost-article .content-body {
    border-left: 3px solid #3498db;
    padding-left: 1.5rem;
    margin-left: 0.5rem;
}

.crosspost-footer {
    background: rgba(236, 240, 241, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 3rem;
    text-align: center;
}

.crosspost-footer h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.external-link {
    display: inline-block;
    background: #ecf0f1;
    color: #34495e !important;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.external-link:hover {
    background: #3498db;
    color: white !important;
}

/* Homepage crosspost card styling */
.crosspost-card {
    border-left: 4px solid #3498db;
    position: relative;
}

.card-crosspost-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #3498db;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.crosspost-badge {
    background: #3498db;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

.crosspost-source {
    font-style: italic;
    color: #7f8c8d;
}