:root {
    --primary-color: #cbd5e1;
    --secondary-color: #ff6b35;
    --background-color: #212529;
    --card-background: #2b3035;
    --text-color: #f8f9fa;
    --text-muted: #adb5bd;
    --border-color: #373b3e;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
    overflow-y: scroll;
}

body {
    font-family: var(--font-family);
    background-color: #1a1a1a;
    color: var(--text-color);
    line-height: 1.6;
    background-image: 
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
}

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

/* Header */
.site-header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

.site-logo {
    height: 1em;
    width: auto;
}

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

.site-nav a {
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    padding-bottom: 0.25rem;
    text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary-color);
}

.site-nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.sub-header-bar {
    background: #383e45;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.sub-header-bar .container {
    color: var(--secondary-color);
    font-weight: 400;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.hero-placeholder {
    height: 200px;
    background-color: var(--card-background);
    background-image: url('../images/oda-patch-cables.png');
    background-size: cover;
    background-position: center;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
    min-height: auto;
}

/* Post Cards (Grid) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.post-card {
    background: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    transition: box-shadow 0.2s;
    border: 1px solid var(--border-color);
    /* Added explicit border for contrast */
}

.post-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.post-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

.post-card h2 a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.category-tag {
    background: #343a40;
    color: var(--primary-color);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-intro {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.single-post .post-intro {
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.single-post .post-meta {
    justify-content: center;
}

.summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.summary img {
    display: none;
}

.read-more {
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Single Post */
.single-post {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-background);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content h2 {
    margin: 2.5rem 0 1rem;
    font-size: 1.75rem;
    color: var(--text-color);
}

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

.post-content code {
    background: #f1f5f9;
    padding: 0.2em 0.4em;
    border-radius: 0.25em;
    font-size: 0.9em;
    color: #212529;
}

.post-content pre {
    background: #cbd5e1;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Social Bar */
.social-bar {
    background: #383e45;
    padding: 1.5rem 0;
    margin-top: 0;
}

.social-bar .container {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-bar a {
    color: var(--secondary-color);
}

.social-bar svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Footer */
.site-footer {
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 0;
    text-align: center;
    color: var(--text-muted);
}
