@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root { --ink: #eef0f3; --muted: #8b93a1; --line: #262b34; --paper: #0d0f13; --panel: #151820; --accent: #4fd1c5; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
body { font-family: 'Space Grotesk', -apple-system, sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; margin: 0; font-weight: 700; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: 'JetBrains Mono', monospace; }
.placeholder-img { background: linear-gradient(135deg, #1a1e26, #12151b); display: flex; align-items: center; justify-content: center; color: #4a5160; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; object-fit: cover; }

.site-header { border-bottom: 1px solid var(--line); padding: 20px 0; }
.header-inner { display: flex; align-items: center; justify-content: center; }
.logo-group { display: flex; align-items: center; gap: 12px; }
.logo-box { width: 44px; height: 44px; border-radius: 8px; background: var(--accent); color: #06231f; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.logo-img { height: 112px; width: auto; max-width: 400px; object-fit: contain; }
.site-name { font-size: 22px; font-weight: 700; }
.site-tagline { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.main-nav { background: var(--panel); border-bottom: 1px solid var(--line); }
.main-nav .wrap { display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; }
.main-nav a { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: 12.5px; font-weight: 500; letter-spacing: .03em; padding: 12px 18px; display: block; }
.main-nav a.home { color: var(--accent); }
.main-nav a:hover:not(.home) { color: var(--ink); }

.layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; padding: 34px 24px; max-width: 1180px; margin: 0 auto; align-items: start; }

.feature-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 34px; }
.feature-main { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.feature-main .placeholder-img, .feature-main img { width: 100%; height: 280px; }
.feature-main .inner { padding: 20px; }
.cat-tag { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.feature-main h1, .feature-main h2 { font-size: 24px; line-height: 1.25; margin: 8px 0; }
.feature-main p { color: var(--muted); font-size: 14px; margin: 0; }
.meta { color: #5a6270; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
.feature-side { display: flex; flex-direction: column; gap: 14px; }
.feature-side-item { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.feature-side-item .placeholder-img, .feature-side-item img { width: 84px; height: 64px; border-radius: 6px; flex-shrink: 0; font-size: 8px; }
.feature-side-item h3 { font-size: 13.5px; line-height: 1.3; margin: 2px 0; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-heading h2 { font-size: 18px; }
.section-heading .see-all { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--accent); }
section.cat-section { margin-bottom: 40px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color .15s; }
.grid-card:hover { border-color: var(--accent); }
.grid-card .placeholder-img, .grid-card img { width: 100%; height: 140px; }
.grid-card .inner { padding: 14px; }
.grid-card h3 { font-size: 15px; line-height: 1.3; margin: 6px 0 8px; }
.featured-ribbon { display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: #06231f; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; margin-bottom: 6px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.post-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.post-card .placeholder-img, .post-card img { width: 100%; height: 140px; }
.post-card h3 { font-size: 15px; margin: 12px 14px 4px; line-height: 1.3; }
.post-card p { font-size: 13px; color: var(--muted); margin: 0 14px 10px; }
.post-card .meta { margin: 0 14px 14px; display: block; }
.post-card .cat-tag { margin: 12px 14px 0; display: block; }

.sidebar { display: flex; flex-direction: column; gap: 18px; }
.widget { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.widget h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; font-family: 'JetBrains Mono', monospace; color: var(--muted); }
.trending-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.trending-list li { counter-increment: rank; display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trending-list li:last-child { border-bottom: none; }
.trending-list li::before { content: counter(rank); font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 700; color: var(--accent); opacity: .5; }
.t-title a { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.t-meta { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; margin-top: 2px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { background: #1c2029; border: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: 11.5px; padding: 5px 10px; border-radius: 6px; }
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }
.newsletter-widget input { width: 100%; padding: 9px 10px; background: #0d0f13; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-family: inherit; margin-bottom: 8px; }
.newsletter-widget button { width: 100%; background: var(--accent); color: #06231f; border: none; padding: 9px; border-radius: 6px; font-weight: 700; cursor: pointer; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-row a { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.social-row a:hover { color: var(--accent); }
.ad-widget { text-align: center; color: #444b58; font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 30px 10px; border-style: dashed; }

.category-title { font-size: 26px; margin: 0 0 24px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.tag-pill-link { background: #1c2029; border: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: 11.5px; padding: 5px 10px; border-radius: 6px; color: var(--muted); }
.tag-pill-link:hover { color: var(--accent); border-color: var(--accent); }

.single-post-header h1 { font-size: 32px; line-height: 1.25; margin: 10px 0 12px; }
.single-post-headline { width: 100%; border-radius: 10px; margin-bottom: 26px; }
.single-post-content { font-size: 16px; line-height: 1.75; color: #d3d7dd; }
.single-post-content p { margin: 0 0 18px; }
.single-post-content a { color: var(--accent); text-decoration: underline; }
.single-post-content img { border-radius: 8px; margin: 20px 0; }

.related-posts { margin-top: 50px; border-top: 1px solid var(--line); padding-top: 26px; }
.related-posts h2 { font-size: 17px; margin-bottom: 16px; }

.search-form { display: flex; gap: 10px; margin: 0 0 22px; }
.search-form input { flex: 1; padding: 11px 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; font-family: inherit; font-size: 14px; }
.search-form button { background: var(--accent); color: #06231f; border: none; border-radius: 8px; padding: 0 20px; font-weight: 700; cursor: pointer; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state h1 { color: var(--ink); font-size: 26px; }
.btn { display: inline-block; margin-top: 16px; background: var(--accent); color: #06231f; padding: 10px 20px; border-radius: 8px; font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); padding: 40px 24px 24px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.footer-grid h4 { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; }
.footer-grid p { font-size: 13px; color: var(--muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 13px; }
.footer-bottom { padding-top: 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #4a5160; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
