:root {
  --bg: #10101a;
  --surface: #151521;
  --surface-strong: #1a1a28;
  --text: #f0f0f5;
  --muted: #9ca3af;
  --dim: #68707f;
  --cyan: #00ffff;
  --cyan-soft: rgba(0, 255, 255, 0.12);
  --border: rgba(0, 255, 255, 0.14);
  --border-strong: rgba(0, 255, 255, 0.34);
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(0, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { color: var(--bg); background: var(--cyan); }
a { color: inherit; }

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: .7rem 1rem;
  color: var(--bg);
  background: var(--cyan);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0, 255, 255, .08);
  background: rgba(16, 16, 26, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
}

.nav-shell, .page-shell, .footer-shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-brand {
  color: var(--cyan);
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(0, 255, 255, .8), 0 0 20px rgba(0, 255, 255, .35);
}
.brand-cursor { font-size: .72em; opacity: .8; }

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.1rem); }
.site-nav a {
  color: #d5d5dd;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--cyan); }

.page-shell { min-height: calc(100vh - 170px); }

.blog-hero {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.blog-hero h1 {
  max-width: 930px;
  margin: 0;
  font-size: clamp(3.35rem, 9vw, 7.3rem);
  font-weight: 850;
  letter-spacing: -.065em;
  line-height: .84;
  text-transform: uppercase;
}
.blog-hero h1 span {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 255, 255, .6), 0 0 30px rgba(0, 255, 255, .22);
}

.hero-copy {
  max-width: 730px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 300;
}

.terminal-cursor {
  display: inline-block;
  width: 3px;
  height: 1.15em;
  margin-left: .45rem;
  vertical-align: -.16em;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .terminal-cursor { animation: none; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.3rem; }
.button {
  min-width: 154px;
  padding: .78rem 1.3rem;
  border: 1px solid #3f4150;
  border-radius: 6px;
  font-size: .86rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--cyan); }
.button-primary { color: var(--bg); border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 18px rgba(0, 255, 255, .3); }
.button-secondary { color: var(--text); background: rgba(255,255,255,.015); }

.archive-section { padding: 6rem 0 7rem; border-top: 1px solid var(--border); scroll-margin-top: 68px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.25rem; }
.section-heading .eyebrow { margin-bottom: .35rem; }
.section-heading h2 { margin: 0; color: var(--cyan); font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1; letter-spacing: -.02em; }
.archive-count { color: var(--dim); font: 700 .72rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; }

.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: clamp(1.35rem, 3vw, 2rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(25,25,39,.95), rgba(18,18,29,.95));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.post-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--cyan); opacity: 0; transition: opacity .2s ease; }
.post-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 18px 45px rgba(0,0,0,.28); }
.post-card:hover::before { opacity: 1; }
.card-index { position: absolute; top: 1.35rem; right: 1.35rem; color: rgba(0,255,255,.24); font: 700 .67rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; }
.post-meta { display: flex; align-items: center; gap: .65rem; color: var(--muted); font: 600 .72rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .09em; text-transform: uppercase; }
.post-card h3 { margin: 1.15rem 0 .85rem; padding-right: 1.5rem; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.2; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--cyan); }
.post-card p { margin: 0 0 1.2rem; color: #b4b7c1; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: .2rem 0 1.25rem; }
.tag { padding: .25rem .55rem; border: 1px solid var(--border); border-radius: 3px; color: var(--cyan); background: rgba(0,255,255,.035); font: 600 .65rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.read-more { margin-top: auto; color: var(--cyan); font: 700 .72rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-decoration: none; }
.read-more:hover { text-shadow: 0 0 8px rgba(0,255,255,.7); }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.5rem; padding: 1.1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--muted); font: 700 .72rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.pagination a { color: var(--cyan); text-decoration: none; }
.disabled { color: #555966; }

.post-full { max-width: 860px; margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) 0; }
.back-link { display: inline-block; color: var(--cyan); text-decoration: none; }
.post-header { padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.post-header h1 { margin: .7rem 0 1.2rem; font-size: clamp(2.45rem, 6vw, 4.9rem); line-height: .98; letter-spacing: -.045em; }
.post-header .tags { margin-top: 1.25rem; margin-bottom: 0; }
.post-content { padding: 2.6rem 0 1rem; color: #d5d6dd; font-size: 1.075rem; }
.post-content > :first-child { margin-top: 0; }
.post-content h2, .post-content h3, .post-content h4 { margin: 2.2em 0 .7em; color: var(--text); line-height: 1.2; }
.post-content h2 { padding-bottom: .4rem; border-bottom: 1px solid var(--border); color: var(--cyan); font-size: 1.75rem; }
.post-content a { color: var(--cyan); text-underline-offset: .18em; }
.post-content img { display: block; max-width: 100%; height: auto; margin: 2rem auto; border: 1px solid var(--border-strong); border-radius: 4px; }
.post-content blockquote { margin: 2rem 0; padding: .3rem 0 .3rem 1.4rem; border-left: 3px solid var(--cyan); color: #b9bdc8; }
.post-content code { padding: .12rem .34rem; color: #9fffff; background: rgba(0,255,255,.08); font-family: "Cascadia Code", Consolas, Monaco, monospace; font-size: .88em; }
.post-content pre { max-width: 100%; margin: 1.8rem 0; padding: 1.2rem; overflow-x: auto; border: 1px solid var(--border); border-radius: 4px; background: #0b0b13; }
.post-content pre code { padding: 0; color: #d8d9e0; background: transparent; }
.post-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.post-content th, .post-content td { padding: .65rem .8rem; border: 1px solid var(--border); text-align: left; }
.post-content th { color: var(--cyan); background: var(--cyan-soft); }

.post-nav { width: min(calc(100% - 2rem), 860px); margin: 0 auto 6rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-nav-link { color: #d8d9df; text-decoration: none; }
.post-nav-link span { display: block; margin-bottom: .35rem; color: var(--cyan); font: 700 .66rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; }
.align-right { text-align: right; }

.site-footer { border-top: 1px solid rgba(0,255,255,.09); background: rgba(21,21,33,.75); }
.footer-shell { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .76rem; }
.system-status { color: #8f96a5; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.system-status i { display: inline-block; width: 7px; height: 7px; margin-right: .45rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }

@media (max-width: 760px) {
  .nav-shell { min-height: 62px; }
  .site-brand { font-size: .82rem; }
  .site-nav { gap: .85rem; }
  .site-nav a:nth-child(2), .site-nav a:nth-child(3) { display: none; }
  .blog-hero { min-height: 74vh; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 300px; }
  .section-heading { align-items: flex-start; }
  .post-nav { grid-template-columns: 1fr; }
  .align-right { text-align: left; }
}

@media (max-width: 480px) {
  .nav-shell, .page-shell, .footer-shell { width: min(calc(100% - 1.35rem), var(--shell)); }
  .blog-hero h1 { font-size: clamp(2.65rem, 15vw, 4rem); }
  .hero-actions, .button { width: 100%; }
  .section-heading, .footer-shell { flex-direction: column; align-items: flex-start; justify-content: center; }
  .archive-count { margin-top: -.75rem; }
}
