:root {
  color-scheme: dark;
  --bg: #071016;
  --bg-2: #0b161d;
  --panel: #101f29;
  --panel-2: #132832;
  --line: #24404d;
  --line-strong: #386070;
  --text: #ecf8fb;
  --muted: #9db6c0;
  --soft: #d0e3e8;
  --cyan: #72e4ff;
  --green: #6ff2b4;
  --amber: #ffd166;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 8%, rgba(114, 228, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 6%, rgba(111, 242, 180, 0.1), transparent 24rem),
    linear-gradient(180deg, #061016 0%, #09141b 44%, #081116 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
}

a {
  color: inherit;
}

a:hover {
  color: var(--cyan);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(114, 228, 255, 0.12);
  background: rgba(7, 16, 22, 0.84);
  backdrop-filter: blur(18px);
}

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

.brand,
.nav-links,
.tag-row,
.hero-actions,
.section-heading,
.footer-grid,
.article-meta {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  text-decoration: none;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(114, 228, 255, 0.32);
  border-radius: 8px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name span,
.post-card-meta,
.article-meta,
.site-footer {
  color: var(--muted);
}

.nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  color: var(--soft);
  font-size: 0.9rem;
}

.nav-links a {
  border-radius: 8px;
  padding: 9px 11px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  align-items: center;
  gap: 40px;
  min-height: min(680px, calc(100vh - 68px));
  padding: 48px 0 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 22px rgba(111, 242, 180, 0.8);
  content: "";
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 860px;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

h3 {
  font-size: 1.24rem;
}

.hero-copy p,
.page-header p,
.featured p,
.article-description {
  max-width: 720px;
  color: var(--soft);
  font-size: 1.08rem;
}

.button,
.topic-cloud a,
.tag-row a {
  border: 1px solid rgba(114, 228, 255, 0.24);
  border-radius: 8px;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 14px;
  font-weight: 700;
}

.button:hover {
  border-color: rgba(114, 228, 255, 0.55);
  color: var(--text);
}

.primary {
  background: var(--cyan);
  color: #041016;
}

.primary:hover {
  background: var(--green);
  color: #041016;
}

.secondary,
.topic-cloud a,
.tag-row a {
  background: rgba(255, 255, 255, 0.05);
}

.hero-actions,
.tag-row,
.article-meta {
  flex-wrap: wrap;
  gap: 10px;
}

.status-panel,
.featured,
.post-card,
.archive-item {
  border: 1px solid rgba(114, 228, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 31, 41, 0.76);
  box-shadow: var(--shadow);
}

.status-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 18px;
  padding: 22px;
}

.status-panel span {
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.featured,
.section,
.page-header,
.article {
  margin-top: 42px;
}

.featured {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.featured time,
.archive-item time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.featured a,
.post-card a,
.archive-item a {
  text-decoration: none;
}

.featured a:hover,
.post-card h3 a:hover,
.archive-item h2 a:hover {
  color: var(--cyan);
}

.section-heading,
.footer-grid {
  justify-content: space-between;
  gap: 20px;
}

.section-heading a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card,
.archive-item {
  padding: 20px;
}

.post-card p,
.archive-item p {
  color: var(--soft);
}

.post-card-meta {
  margin-top: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.tag-row a,
.topic-cloud a {
  padding: 6px 9px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.tag-row a:hover,
.topic-cloud a:hover {
  border-color: rgba(111, 242, 180, 0.5);
  background: rgba(111, 242, 180, 0.08);
  color: var(--green);
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.archive-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.archive-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
}

.article {
  max-width: 880px;
}

.article-header {
  padding: 42px 0 24px;
  border-bottom: 1px solid var(--line);
}

.article-body,
.prose {
  max-width: 760px;
  color: var(--soft);
  font-size: 1.05rem;
}

.article-body h2,
.prose h2 {
  margin-top: 2.2rem;
}

.article-body h2,
.article-body h3,
.prose h2,
.prose h3 {
  color: var(--text);
}

.article-body a,
.prose a {
  color: var(--cyan);
  text-decoration-color: rgba(114, 228, 255, 0.45);
  text-underline-offset: 0.18em;
}

.article-body blockquote,
.prose blockquote {
  margin: 1.5rem 0;
  border-left: 3px solid var(--green);
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.article-body pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #040a0f;
}

.article-body code,
.prose code {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.article-body :not(pre) > code,
.prose :not(pre) > code {
  border: 1px solid rgba(111, 242, 180, 0.18);
  border-radius: 6px;
  padding: 0.08rem 0.32rem;
  background: rgba(111, 242, 180, 0.07);
  font-size: 0.92em;
}

.article-body table,
.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-body th,
.article-body td,
.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  text-align: left;
}

.code-copy {
  float: right;
  margin: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(114, 228, 255, 0.12);
  padding: 30px 0;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--soft);
}

@media (max-width: 820px) {
  .nav,
  .featured,
  .section-heading,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    padding: 14px 0;
  }

  .hero,
  .post-grid,
  .archive-item {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.4rem);
  }

  .shell {
    width: min(100% - 28px, var(--max));
  }
}

@media (max-width: 520px) {
  .brand-name span {
    display: none;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .status-panel {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
