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

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary: #6366f1;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Category colors */
    --kubernetes: #326ce5;
    --gitops: #f05032;
    --terraform: #7b42bc;
    --helm: #0f1689;
    --aws: #ff9900;
    --azure: #0078d4;
    --ci-cd: #fc6d26;
    --security: #ef4444;
    --monitoring: #22c55e;
    --networking: #06b6d4;
    --docker: #2496ed;
    --platform-engineering: #6366f1;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.logo-text .highlight {
    color: var(--primary);
}

.nav-center {
    flex: 1;
    max-width: 400px;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: border-color 0.2s;
}

.search-form:focus-within {
    border-color: var(--primary);
}

.search-form .search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.search-form input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.search-form input::placeholder {
    color: var(--text-muted);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.nav-admin {
    color: var(--primary) !important;
}

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

.username {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-login {
    color: var(--text-secondary) !important;
}

.btn-signup, .btn-logout {
    background: var(--primary) !important;
    color: var(--background) !important;
    font-weight: 600 !important;
}

.btn-signup:hover, .btn-logout:hover {
    background: var(--primary-dark) !important;
}

/* Flash Messages */
.flash-messages {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
}

.flash-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.flash-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.flash-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.flash-message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Terminal */
.terminal {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: var(--surface-light);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #22c55e; }

.terminal-title {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.terminal-body code {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.terminal-body code.output {
    color: var(--text-secondary);
    padding-left: 1rem;
}

.terminal-body code.cursor {
    color: var(--primary);
}

.terminal-body code.cursor::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--primary);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Categories Bar */
.categories-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 65px;
    z-index: 50;
}

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

.category-pill {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--surface-light);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-pill:hover {
    background: var(--primary);
    color: var(--background);
}

.category-pill.active {
    background: var(--primary);
    color: var(--background);
}

/* Posts Section */
.posts-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.clear-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.clear-filter:hover {
    color: var(--primary);
}

.clear-filter svg {
    width: 16px;
    height: 16px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.post-image {
    height: 180px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1rem;
    position: relative;
}

.post-image.kubernetes { background: linear-gradient(135deg, #326ce5 0%, #1a4cb8 100%); }
.post-image.gitops { background: linear-gradient(135deg, #f05032 0%, #c0392b 100%); }
.post-image.terraform { background: linear-gradient(135deg, #7b42bc 0%, #5a2d8a 100%); }
.post-image.helm { background: linear-gradient(135deg, #0f1689 0%, #09105f 100%); }
.post-image.aws { background: linear-gradient(135deg, #ff9900 0%, #ec7211 100%); }
.post-image.azure { background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%); }
.post-image.ci-cd { background: linear-gradient(135deg, #fc6d26 0%, #e24329 100%); }
.post-image.security { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.post-image.monitoring { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.post-image.networking { background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%); }
.post-image.docker { background: linear-gradient(135deg, #2496ed 0%, #0d6ebd 100%); }
.post-image.platform-engineering { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }

.post-category {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-date, .post-views {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.post-date svg, .post-views svg {
    width: 14px;
    height: 14px;
}

.post-content h3 {
    margin-bottom: 0.75rem;
}

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

.post-content h3 a:hover {
    color: var(--primary);
}

.post-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.author-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.author-avatar.large {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: gap 0.2s;
}

.read-more:hover {
    gap: 0.75rem;
}

.read-more svg {
    width: 16px;
    height: 16px;
}

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

.page-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.page-link:hover {
    background: var(--surface-light);
}

.page-link svg {
    width: 18px;
    height: 18px;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Post Detail */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.post-header {
    margin-bottom: 3rem;
}

.post-header-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-category-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.separator {
    color: var(--text-muted);
}

.post-date {
    color: var(--text-muted);
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-excerpt {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 12px;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
}

.post-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.post-stats svg {
    width: 14px;
    height: 14px;
}

/* Post Body */
.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-body h1, .post-body h2, .post-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body h1 { font-size: 2rem; }
.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.25rem; }

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

.post-body code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--surface);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-body pre {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

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

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

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

.post-body strong {
    color: var(--text-primary);
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.tags-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tag {
    background: var(--surface);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: var(--background);
}

/* Post Share */
.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 12px;
}

.post-share span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: white;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }

/* Related Posts */
.related-posts {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.related-posts h2 {
    margin-bottom: 1.5rem;
}

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

.related-card {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.related-image {
    height: 100px;
}

.related-content {
    padding: 1rem;
}

.related-category {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.related-content h3 {
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.related-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-content h3 a:hover {
    color: var(--primary);
}

.related-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Auth Pages */
.auth-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.auth-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 16px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 1rem;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

.input-wrapper svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    padding: 0.875rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.btn-submit svg {
    width: 20px;
    height: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Auth Graphic */
.auth-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-block {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.code-block pre {
    margin: 0;
}

.code-block .keyword { color: #c678dd; }
.code-block .function { color: #61afef; }
.code-block .string { color: #98c379; }
.code-block .class { color: #e5c07b; }

/* About Page */
.about-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.about-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.about-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.about-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.topic-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.topic-card svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.topic-card h3 {
    margin-bottom: 0.5rem;
}

.topic-card p {
    font-size: 0.9rem;
    margin: 0;
}

.about-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Category Page */
.category-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.category-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--primary);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.category-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.category-header p {
    color: var(--text-secondary);
}

/* Search Page */
.search-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.search-header p {
    color: var(--text-secondary);
}

.search-form-large {
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
}

.search-form-large:focus-within {
    border-color: var(--primary);
}

.search-form-large svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    margin-right: 1rem;
}

.search-form-large input {
    flex: 1;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
}

.search-form-large button {
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.results-count {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

.search-suggestions h3 {
    margin-bottom: 1rem;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.suggestion-tag {
    padding: 0.5rem 1rem;
    background: var(--surface);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.suggestion-tag:hover {
    background: var(--primary);
    color: var(--background);
}

/* Admin Dashboard */
.admin-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
}

.admin-header h1 svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.header-nav {
    margin-bottom: 1rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-icon.posts { background: rgba(99, 102, 241, 0.2); color: var(--secondary); }
.stat-icon.users { background: rgba(16, 185, 129, 0.2); color: var(--primary); }
.stat-icon.views { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.stat-icon.categories { background: rgba(236, 72, 153, 0.2); color: #ec4899; }

.stat-info .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-section .section-header {
    margin-bottom: 1.5rem;
}

.admin-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.admin-section .section-header h2 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table td {
    font-size: 0.9rem;
}

.post-title-cell a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-title-cell a:hover {
    color: var(--primary);
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-badge.kubernetes { background: rgba(50, 108, 229, 0.2); color: var(--kubernetes); }
.category-badge.gitops { background: rgba(240, 80, 50, 0.2); color: var(--gitops); }
.category-badge.terraform { background: rgba(123, 66, 188, 0.2); color: var(--terraform); }
.category-badge.helm { background: rgba(15, 22, 137, 0.2); color: #4e5fd4; }
.category-badge.aws { background: rgba(255, 153, 0, 0.2); color: var(--aws); }
.category-badge.azure { background: rgba(0, 120, 212, 0.2); color: var(--azure); }
.category-badge.ci-cd { background: rgba(252, 109, 38, 0.2); color: var(--ci-cd); }
.category-badge.security { background: rgba(239, 68, 68, 0.2); color: var(--security); }
.category-badge.monitoring { background: rgba(34, 197, 94, 0.2); color: var(--monitoring); }
.category-badge.networking { background: rgba(6, 182, 212, 0.2); color: var(--networking); }
.category-badge.docker { background: rgba(36, 150, 237, 0.2); color: var(--docker); }
.category-badge.platform-engineering { background: rgba(99, 102, 241, 0.2); color: var(--platform-engineering); }

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.published {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-badge.draft {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge.admin {
    background: rgba(99, 102, 241, 0.2);
    color: var(--secondary);
}

.role-badge.user {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
}

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

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn.edit {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.action-btn.edit:hover {
    background: rgba(59, 130, 246, 0.3);
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.inline-form {
    display: inline;
}

/* Users table — status badges + text action button */
.status-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-badge.disabled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.action-btn-text {
    height: 32px;
    padding: 0 0.75rem;
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-secondary);
}

.action-btn-text:hover {
    background: rgba(100, 116, 139, 0.32);
}

.actions-self {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Post Form */
.post-form {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.form-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-main .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-main input, .form-main textarea, .form-main select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-main textarea {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
}

.form-main input:focus, .form-main textarea:focus, .form-main select:focus {
    border-color: var(--primary);
}

.form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
}

.sidebar-card h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.sidebar-card .form-group {
    margin-bottom: 1rem;
}

.sidebar-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sidebar-card input, .sidebar-card select {
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.sidebar-card input:focus, .sidebar-card select:focus {
    border-color: var(--primary);
}

.checkbox-group {
    margin-top: 1rem;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.post-info {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

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

.btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

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

.full-width {
    width: 100%;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 3rem;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links h4 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

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

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

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

.footer-newsletter h4 {
    margin-bottom: 0.5rem;
}

.footer-newsletter p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.newsletter-form button {
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-graphic {
        display: none;
    }

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

    .post-form {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-center {
        order: 3;
        flex: 100%;
        max-width: none;
        margin-top: 1rem;
    }

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

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

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

    .admin-stats {
        grid-template-columns: 1fr;
    }

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

/* ===========================================================================
 * Tools & Skills tiles (homepage)
 * =========================================================================== */

.tools-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.tools-section .section-header {
    margin-bottom: 1.5rem;
}

.tools-section .section-subtitle {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.category-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff;
    min-height: 72px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.22) 100%);
    pointer-events: none;
}

.category-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.category-tile .tile-name {
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 1;
}

.category-tile .tile-count {
    font-size: 0.75rem;
    opacity: 0.9;
    z-index: 1;
}

/* Per-category gradients — mirror .post-image colours */
.category-tile.kubernetes           { background: linear-gradient(135deg, #326ce5 0%, #1a4cb8 100%); }
.category-tile.gitops               { background: linear-gradient(135deg, #f05032 0%, #c0392b 100%); }
.category-tile.terraform            { background: linear-gradient(135deg, #7b42bc 0%, #5a2d8a 100%); }
.category-tile.helm                 { background: linear-gradient(135deg, #0f1689 0%, #09105f 100%); }
.category-tile.aws                  { background: linear-gradient(135deg, #ff9900 0%, #ec7211 100%); }
.category-tile.azure                { background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%); }
.category-tile.ci-cd                { background: linear-gradient(135deg, #fc6d26 0%, #e24329 100%); }
.category-tile.security             { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.category-tile.monitoring           { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.category-tile.networking           { background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%); }
.category-tile.docker               { background: linear-gradient(135deg, #2496ed 0%, #0d6ebd 100%); }
.category-tile.platform-engineering { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }

@media (max-width: 768px) {
    .tools-section {
        padding: 0 1rem;
        margin: 2rem auto;
    }
    .category-tiles {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ===========================================================================
 * Contact page
 * =========================================================================== */

.contact-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.contact-form textarea {
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Honeypot — visually hidden and off-screen; bots fill it, humans don't */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Admin header with multiple action buttons */
.admin-header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Contact message body cell — wrap long text instead of stretching the table */
.message-body-cell {
    max-width: 380px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===========================================================================
 * Comments (post page)
 * =========================================================================== */

.comments-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.comments-section h2 {
    margin-bottom: 1.5rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.comment {
    display: flex;
    gap: 1rem;
}

.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.comment-content {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.comment-delete:hover {
    color: #ef4444;
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.comments-empty {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-form label {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-form textarea {
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form .btn-submit {
    align-self: flex-start;
    width: auto;
    padding: 0.75rem 1.5rem;
}

.comment-login-prompt {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
}

.comment-login-prompt a {
    color: var(--primary);
}
