:root {
  --bg: #060606;
  --bg-2: #0B0B0B;
  --panel: #0F0F0F;
  --panel-2: #131313;
  --line: #1E1E1E;
  --line-2: #2A2A2A;
  --text: #F5F5F5;
  --muted: #6E6E6E;
  --dim: #9A9A9A;
  --accent: #C6FF3D;
  --accent-2: #FF5C26;
  --red: #FF3D3D;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 6, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}
.logo .brand-red { color: var(--red); }
.site-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}
.site-nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 5px;
  transition: all 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--panel-2); }
.site-nav a.active { color: var(--accent); }

/* Main wrap */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 32px 80px;
  position: relative;
  z-index: 1;
}
.breadcrumb-row {
  margin-bottom: 28px;
}
.bc-up {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.bc-up:hover { color: var(--accent); }

.page-head {
  margin-bottom: 56px;
}
.sec-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.sec-tag::before {
  content: "//";
  color: var(--muted);
}
.page-head h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.page-head h1 .em { color: var(--muted); }
.page-head .lead {
  color: var(--dim);
  font-size: 17px;
  max-width: 640px;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 80px;
}
.blog-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.blog-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.02) 75%, transparent 75%);
  background-size: 5px 5px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
  border-radius: inherit;
}
.blog-card > * { position: relative; z-index: 1; }
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.bc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.bc-cat {
  color: var(--accent);
  background: rgba(198,255,61,0.07);
  border: 1px solid rgba(198,255,61,0.25);
  padding: 3px 8px;
  border-radius: 4px;
}
.bc-date { color: var(--muted); }
.bc-title {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.bc-excerpt {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.bc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
}
.bc-read { color: var(--accent); }
.bc-time { color: var(--muted); }

/* CTA row */
.cta-row {
  padding: 48px 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(198,255,61,0.07), transparent 70%);
  pointer-events: none;
}
.cta-row h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.cta-row p {
  color: var(--dim);
  font-size: 15px;
  margin-bottom: 22px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}
.cta-row .btn {
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover {
  background: #d6ff5a;
  border-color: #d6ff5a;
  box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.15);
}

/* Article styles */
article.post {
  max-width: 760px;
  margin: 0 auto;
}
article.post .meta-line {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-wrap: wrap;
}
article.post .meta-line .cat {
  color: var(--accent);
  background: rgba(198,255,61,0.07);
  border: 1px solid rgba(198,255,61,0.25);
  padding: 3px 8px;
  border-radius: 4px;
}
article.post h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 20px;
}
article.post .lead {
  color: var(--dim);
  font-size: 19px;
  line-height: 1.55;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
article.post h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 48px 0 18px;
}
article.post h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 32px 0 14px;
  color: var(--text);
}
article.post p, article.post li {
  color: var(--dim);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}
article.post strong {
  color: var(--text);
  font-weight: 500;
}
article.post a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(198,255,61,0.3);
}
article.post a:hover { border-bottom-color: var(--accent); }
article.post ul, article.post ol {
  margin: 0 0 20px 24px;
}
article.post li { margin-bottom: 8px; }
article.post .note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: 8px;
  margin: 24px 0;
  font-size: 15px;
  color: var(--dim);
}
article.post .note strong { color: var(--accent); }
article.post .warning {
  border-left-color: var(--accent-2);
}
article.post .warning strong { color: var(--accent-2); }

/* Tables in articles */
article.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
article.post table th, article.post table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
article.post table th {
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
article.post table tbody tr:last-child td { border-bottom: none; }
article.post table tbody tr:hover { background: var(--panel-2); }
article.post table td { color: var(--dim); }
article.post table td.num { font-family: var(--mono); color: var(--text); white-space: nowrap; }

/* Related posts */
.related {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.related h3 {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.related .blog-grid { margin-bottom: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}
.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer .footer-bottom a {
  color: var(--muted);
  text-decoration: underline;
}
.site-footer .footer-bottom a:hover { color: var(--accent); }

@media (max-width: 1080px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 680px) {
  .blog-grid { grid-template-columns: 1fr; }
  .wrap { padding: 32px 20px 60px; }
  .container { padding: 0 20px; }
  .cta-row { padding: 32px 24px; }
}
