:root {
  --bg: #07120b;
  --bg2: #050c07;
  --panel: #0a2213;
  --panel2: #0b2b18;
  --text: #b7ffcc;
  --muted: #79c493;
  --accent: #33ff77;
  --accent2: #00d4ff;
  --danger: #ff4d6d;
  --shadow: rgba(0, 0, 0, .55);
  --border: rgba(183, 255, 204, .18);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --radius: 14px;
  --max: 1140px;
}

/* Base reset */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(1200px 800px at 25% 0%, rgba(51, 255, 119, .09), transparent 55%),
    radial-gradient(900px 650px at 85% 30%, rgba(0, 212, 255, .06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: geometricPrecision;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a.homelink {
  color: var(--text);
  text-decoration: none;
}

a.homelink:hover {
  color: var(--accent);
  text-decoration: none;
}

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

/* CRT scanline + vignette effect */
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      rgba(0, 0, 0, 0.0) 2px,
      rgba(0, 0, 0, 0.0) 4px);
  mix-blend-mode: overlay;
  opacity: .55;
}

body:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1200px 800px at 50% 35%, transparent 35%, rgba(0, 0, 0, .35) 75%, rgba(0, 0, 0, .6) 100%);
  opacity: .85;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 9999;
}

/* Layout */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(100%, calc(var(--max) + 32px));
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(7, 18, 11, .72);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 34, 19, .9), rgba(10, 34, 19, .5));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  padding: 6px;
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title strong {
  font-family: var(--mono);
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 14px;
}

.brand-title span {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  opacity: .9;
}

/* Nav */
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
}

.primary-nav ul {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.primary-nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .35px;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.primary-nav a:hover {
  background: rgba(10, 34, 19, .65);
  border-color: var(--border);
  text-decoration: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(10, 34, 19, .55);
}

.search-form input[type="search"] {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  width: 180px;
}

.search-form button {
  border: 1px solid var(--border);
  background: rgba(51, 255, 119, .08);
  color: var(--accent);
  border-radius: 10px;
  padding: 6px 10px;
  font-family: var(--mono);
  cursor: pointer;
}

.search-form button:hover {
  background: rgba(51, 255, 119, .16);
}

/* Main content grid */
.site-main {
  flex: 1;
  padding: 22px 0 48px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
}

.no-sidebar .grid {
  grid-template-columns: 1fr;
}

.panel {
  background: linear-gradient(180deg, rgba(10, 34, 19, .7), rgba(10, 34, 19, .35));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

/* Hero */
.hero {
  padding: 18px;
  margin-bottom: 16px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-title {
  font-family: var(--mono);
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--muted);
}

.hero-chip {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(5, 12, 7, .35);
}

.hero-feature {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hero-feature {
    grid-template-columns: 1fr;
  }

  .search-form input[type="search"] {
    width: 120px;
  }
}

/* Header / nav responsive */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 34, 19, .55);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  font-family: var(--mono);
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(10, 34, 19, .72);
}

.nav-toggle-icon {
  width: 18px;
  height: 12px;
  display: inline-block;
  position: relative;
}

.nav-toggle-icon:before,
.nav-toggle-icon:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(183, 255, 204, .75);
  border-radius: 2px;
}

.nav-toggle-icon:before {
  top: 0;
  box-shadow: 0 5px 0 rgba(183, 255, 204, .75), 0 10px 0 rgba(183, 255, 204, .75);
}

@media (max-width: 860px) {
  .header-inner {
    align-items: flex-start;
  }

  .brand {
    min-width: 0;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nav-toggle {
    display: flex;
    justify-content: space-between;
  }

  .primary-nav ul {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(10, 34, 19, .55);
  }

  html.nav-open .primary-nav ul {
    display: flex;
  }

  .primary-nav a {
    display: block;
  }

  .header-tools {
    width: 100%;
  }

  .search-form {
    width: 100%;
  }

  .search-form input[type="search"] {
    width: 100%;
  }
}

.card {
  padding: 16px;
}

.card h2,
.card h1 {
  margin: 0 0 8px;
  font-family: var(--mono);
  letter-spacing: .2px;
}

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

.card h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.post-meta .meta-sep {
  opacity: .6;
}

.excerpt {
  margin: 10px 0 0;
  color: rgba(183, 255, 204, .92);
}

.thumb {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(5, 12, 7, .35);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wp-block-social-links .wp-block-social-link.wp-social-link {
  filter: grayscale(100%) sepia(100%) hue-rotate(88deg);
}

/* Loop list */
.posts-list .post-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.posts-list .post-item:first-child {
  border-top: 0;
}

.posts-list .post-item .thumb {
  height: 100%;
}

.posts-list .post-item .thumb img {
  height: 100%;
  object-fit: cover;
}

.posts-list h2 {
  font-size: 18px;
}

@media (max-width: 640px) {
  .posts-list .post-item {
    grid-template-columns: 1fr;
  }
}

/* Single */
.entry {
  padding: 18px;
}

.entry h1 {
  font-family: var(--mono);
  margin: 0 0 10px;
}

.entry-content {
  margin-top: 14px;
}

.entry-content p {
  margin: 0 0 16px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--mono);
  letter-spacing: .2px;
  margin: 26px 0 10px;
}

.entry-content code {
  background: rgba(5, 12, 7, .45);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--mono);
}

.entry-content pre {
  background: rgba(5, 12, 7, .55);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: auto;
}

/* Sidebar / widgets */
.sidebar {
  padding: 18px;
}

.widget {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(5, 12, 7, .22);
  margin-bottom: 14px;
}

.widget-title {
  margin: 0 0 10px;
  font-family: var(--mono);
  letter-spacing: .3px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--muted);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(183, 255, 204, .18);
}

.widget li:last-child {
  border-bottom: 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-top: 1px solid var(--border);
}

.pagination a,
.pagination span {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 34, 19, .55);
}

.pagination .current {
  background: rgba(51, 255, 119, .12);
  border-color: rgba(51, 255, 119, .35);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 12, 7, .5);
}

.footer-inner {
  padding: 22px 0;
  display: grid;
  gap: 14px;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.footer-nav ul {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Accessible focus */
a:focus,
button:focus,
input:focus {
  outline: 2px solid rgba(51, 255, 119, .35);
  outline-offset: 2px;
}

/* Utility */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .3px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(5, 12, 7, .25);
  color: var(--muted);
}