:root {
  --c-bg: #0c1116;
  --c-bg-2: #121920;
  --c-panel: #161e27;
  --c-line: rgba(180, 210, 220, 0.12);
  --c-text: #e7eef2;
  --c-muted: #8fa3b0;
  --c-accent: #3ecfbe;
  --c-accent-2: #2aa89a;
  --c-warn: #e2b15c;
  --c-sans: "Space Grotesk", "Segoe UI", sans-serif;
  --c-mono: "IBM Plex Mono", ui-monospace, monospace;
  --c-max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  max-width: 100%;
}

.nm-code-body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  color: var(--c-text);
  font-family: var(--c-sans);
  overflow-x: clip;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(62, 207, 190, 0.12), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(80, 120, 160, 0.1), transparent 50%),
    var(--c-bg);
}

.nm-code-body .site-header,
.nm-code-body .site-footer,
.nm-code-body #sidebar,
.nm-code-body .sidebar,
.nm-code-body .menu-toggle {
  display: none !important;
}

.nm-code-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(180, 210, 220, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 210, 220, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
}

.nm-skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: #fff;
  color: #000;
  padding: 0.75rem 1rem;
}

.nm-skip:focus {
  left: 1rem;
  top: 1rem;
}

.nm-code-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding:
    calc(1rem + env(safe-area-inset-top, 0px))
    max(1.25rem, env(safe-area-inset-right, 0px))
    1rem
    max(1.25rem, env(safe-area-inset-left, 0px));
  background: rgba(12, 17, 22, 0.88);
  border-bottom: 1px solid var(--c-line);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  max-width: 100%;
}

.admin-bar .nm-code-top {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .nm-code-top {
    top: 46px;
  }
}

.nm-code-top.is-scrolled {
  background: rgba(12, 17, 22, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.nm-code-top-inner {
  width: min(100%, var(--c-max));
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  box-sizing: border-box;
}

.nm-code-nav {
  flex-shrink: 0;
  min-width: 0;
}

.nm-code-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--c-text);
  text-decoration: none;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nm-code-brand-mark {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 0.15rem;
  background: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(62, 207, 190, 0.18);
}

.nm-code-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nm-code-nav a {
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nm-code-nav a:hover {
  color: var(--c-text);
}

.nm-code-mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.5rem;
  border: 1px solid var(--c-line);
  color: var(--c-accent) !important;
  background: rgba(62, 207, 190, 0.06);
}

.nm-code-mail:hover {
  background: rgba(62, 207, 190, 0.14);
}

.nm-code-cta {
  color: #061016 !important;
  background: var(--c-accent);
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.nm-code-cta:hover {
  background: #63dbc9;
}

.nm-code-hero {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--c-max));
  margin: 0 auto;
  padding: 7.5rem 0 2.5rem;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.nm-code-comment {
  margin: 0 0 0.9rem;
  font-family: var(--c-mono);
  font-size: 0.82rem;
  color: #6f8794;
}

.nm-code-title {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.nm-code-title span {
  color: var(--c-accent);
}

.nm-code-lede {
  margin: 0 0 1.4rem;
  max-width: 34rem;
  color: var(--c-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.nm-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
}

.nm-code-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.55rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nm-code-btn-primary {
  background: var(--c-accent);
  color: #061016;
}

.nm-code-btn-primary:hover {
  background: #63dbc9;
}

.nm-code-btn-ghost {
  color: var(--c-text);
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, 0.02);
}

.nm-code-btn-ghost:hover {
  border-color: rgba(180, 210, 220, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.nm-code-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.nm-code-tags li {
  font-family: var(--c-mono);
  font-size: 0.74rem;
  color: var(--c-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, 0.02);
}

.nm-code-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--c-mono);
  font-size: 0.78rem;
  color: #7f97a5;
}

.nm-code-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 0 rgba(62, 207, 190, 0.55);
  animation: nm-code-pulse 2.2s ease-out infinite;
}

.nm-code-photo {
  margin: 0;
}

.nm-code-window {
  border: 1px solid var(--c-line);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--c-panel);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.nm-code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--c-line);
  background: #10171f;
}

.nm-code-window-bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3a4652;
}

.nm-code-window-bar span:nth-child(1) { background: #ff5f57; }
.nm-code-window-bar span:nth-child(2) { background: #febc2e; }
.nm-code-window-bar span:nth-child(3) { background: #28c840; }

.nm-code-window-bar em {
  margin-left: 0.55rem;
  font-family: var(--c-mono);
  font-style: normal;
  font-size: 0.72rem;
  color: #7f97a5;
}

.nm-code-window-body img {
  display: block;
  width: 100%;
  height: min(52vh, 460px);
  object-fit: cover;
  object-position: center 22%;
}

.nm-code-about,
.nm-code-pulse,
.nm-code-contact {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--c-max));
  margin: 0 auto;
  padding: 2.4rem 0;
  border-top: 1px solid var(--c-line);
}

.nm-code-pulse {
  scroll-margin-top: 6.5rem;
}

.nm-code-pulse h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.nm-code-pulse-lede {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  color: var(--c-muted);
  line-height: 1.65;
}

.nm-code-pulse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--c-line);
}

.nm-code-pulse-list li {
  border-bottom: 1px solid var(--c-line);
}

.nm-code-pulse-list a {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.85rem 1.25rem;
  align-items: baseline;
  padding: 1rem 0;
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.nm-code-pulse-list a:hover .nm-code-pulse-item-title,
.nm-code-pulse-list a:focus-visible .nm-code-pulse-item-title {
  color: var(--c-accent);
}

.nm-code-pulse-list time {
  font-family: var(--c-mono);
  font-size: 0.75rem;
  color: var(--c-muted);
}

.nm-code-pulse-item-title {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-text);
  transition: color 160ms ease;
}

.nm-code-pulse-source {
  margin: 1.1rem 0 0;
  font-size: 0.88rem;
}

.nm-code-pulse-source a {
  color: var(--c-accent);
  text-decoration: none;
  font-family: var(--c-mono);
  font-size: 0.82rem;
}

.nm-code-pulse-source a:hover,
.nm-code-pulse-source a:focus-visible {
  text-decoration: underline;
}

.nm-code-about-inner {
  max-width: 40rem;
}

.nm-code-about h2,
.nm-code-contact h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.nm-code-about p,
.nm-code-contact > div > p {
  margin: 0 0 0.85rem;
  color: var(--c-muted);
  line-height: 1.7;
}

.nm-code-contact {
  scroll-margin-top: 6.5rem;
}

.nm-code-contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.4rem, 4vw, 2.75rem);
}

.nm-code-mail-line a {
  color: var(--c-accent);
  text-decoration: none;
  font-family: var(--c-mono);
  font-size: 0.92rem;
}

.nm-code-panel {
  background: var(--c-panel);
  border: 1px solid var(--c-line);
  border-radius: 1rem;
  padding: 1.2rem;
}

.nm-code-alert {
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
}

.nm-code-alert.ok {
  background: rgba(62, 207, 190, 0.1);
  color: var(--c-accent);
  border: 1px solid rgba(62, 207, 190, 0.25);
}

.nm-code-alert.err {
  background: rgba(220, 80, 80, 0.1);
  color: #f0a0a0;
  border: 1px solid rgba(220, 80, 80, 0.25);
}

.nm-code-form {
  display: grid;
  gap: 0.85rem;
}

.nm-code-form label {
  display: grid;
  gap: 0.35rem;
}

.nm-code-form label span {
  font-family: var(--c-mono);
  font-size: 0.75rem;
  color: #8fa3b0;
}

.nm-code-form input,
.nm-code-form select,
.nm-code-form textarea {
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: 0.6rem;
  background: #0f151c;
  color: var(--c-text);
  font: inherit;
  padding: 0.75rem 0.85rem;
}

.nm-code-form input:focus,
.nm-code-form select:focus,
.nm-code-form textarea:focus {
  outline: none;
  border-color: rgba(62, 207, 190, 0.45);
  box-shadow: 0 0 0 3px rgba(62, 207, 190, 0.12);
}

.nm-code-form button {
  justify-self: start;
  border: 0;
  cursor: pointer;
  min-height: 2.7rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.55rem;
  background: var(--c-accent);
  color: #061016;
  font: inherit;
  font-weight: 600;
}

.nm-code-form button:hover {
  background: #63dbc9;
}

.nm-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nm-code-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--c-max));
  max-width: 100%;
  margin: 0 auto;
  padding:
    calc(5.75rem + env(safe-area-inset-top, 0px))
    max(1.25rem, env(safe-area-inset-right, 0px))
    2.5rem
    max(1.25rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  overflow-x: clip;
}

/* Articles: use most of a large screen instead of a ~42rem reading column. */
.nm-code-body:has(.nm-article) {
  --c-max: 1280px;
}

@media (min-width: 1400px) {
  .nm-code-body:has(.nm-article) {
    --c-max: 1360px;
  }
}

.admin-bar .nm-code-shell {
  padding-top: calc(5.75rem + 32px + env(safe-area-inset-top, 0px));
}

@media screen and (max-width: 782px) {
  .admin-bar .nm-code-shell {
    padding-top: calc(5.75rem + 46px + env(safe-area-inset-top, 0px));
  }
}

.nm-code-nav a.is-active {
  color: var(--c-accent);
}

.nm-code-foot {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--c-max));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--c-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: #7f97a5;
  font-size: 0.82rem;
}

.nm-code-shell .nm-code-foot {
  width: 100%;
  margin-top: 2rem;
}

.nm-code-foot a {
  color: var(--c-accent);
}

/* Hide leftover share bars that break mobile width. */
.nm-code-body .kiwi-nonatomic-share-bar,
.nm-code-body .kiwi-share-bar,
.nm-code-body .kiwi-article-bar,
.nm-code-body [class*="kiwi-share"],
.nm-code-body .essb_links,
.nm-code-body .sharedaddy {
  display: none !important;
}

/* Blog index + articles */
.nm-blog,
.nm-article {
  padding: 0.25rem 0 1rem;
  min-width: 0;
  max-width: 100%;
}

.nm-blog-hero {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.nm-article-hero {
  max-width: none;
  margin: 0 0 2rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--c-line);
}

.nm-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin: 0 0 1rem;
}

.nm-article-back,
.nm-article-date {
  font-family: var(--c-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nm-article-back {
  color: var(--c-accent);
}

.nm-article-back:hover {
  color: #63dbc9;
}

.nm-article-date {
  color: var(--c-muted);
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.nm-article-dek {
  margin: 0.85rem 0 0;
  max-width: 46rem;
  color: var(--c-muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.55;
}

.nm-eyebrow {
  margin: 0 0 0.85rem;
  color: var(--c-accent);
  font-family: var(--c-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.nm-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.nm-eyebrow a:hover {
  color: #63dbc9;
}

.nm-blog-title {
  margin: 0 0 0.85rem;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--c-text);
}

.nm-article-title {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--c-text);
  max-width: 18em;
  text-wrap: balance;
}

.nm-blog-lede {
  margin: 0;
  color: var(--c-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 36rem;
}

.nm-blog-list {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.nm-blog-card {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--c-line);
  border-radius: 0.85rem;
  background: rgba(22, 30, 39, 0.72);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nm-blog-card:hover {
  border-color: rgba(62, 207, 190, 0.35);
  background: rgba(22, 30, 39, 0.92);
  transform: translateY(-2px);
}

.nm-blog-card-link {
  display: block;
  padding: 1.2rem 1.25rem 1.3rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.nm-blog-meta {
  margin: 0 0 0.55rem;
  color: var(--c-accent);
  font-family: var(--c-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nm-blog-card-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--c-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nm-blog-card-excerpt {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nm-blog-card-more {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--c-accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.nm-blog-pagination {
  margin-top: 2rem;
}

.nm-blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.nm-blog-pagination a,
.nm-blog-pagination span {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--c-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.nm-blog-pagination .current {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #061016;
}

.nm-blog-empty {
  color: var(--c-muted);
}

.nm-article-content {
  max-width: min(60rem, 100%);
  width: 100%;
  color: var(--c-text);
  font-size: clamp(1.05rem, 0.3vw + 1rem, 1.125rem);
  line-height: 1.75;
  overflow-wrap: break-word;
}

.nm-article-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.nm-article-content > *:first-child {
  margin-top: 0;
}

.nm-article-content h2,
.nm-article-content h3 {
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 1.8rem 0 0.75rem;
  color: var(--c-text);
}

.nm-article-content p,
.nm-article-content ul,
.nm-article-content ol {
  margin: 0 0 1.15rem;
  color: #b7c6d0;
}

.nm-article-content a {
  color: var(--c-accent);
}

.nm-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.nm-article-content pre,
.nm-article-content code {
  font-family: var(--c-mono);
}

.nm-article-content pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--c-line);
  background: rgba(8, 12, 16, 0.7);
  color: #d5e3ea;
}

.nm-article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-line);
}

@keyframes nm-code-pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 190, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(62, 207, 190, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 190, 0); }
}

/* Custom cursor — teal on dark */
.nm-has-cursor,
.nm-has-cursor * {
  cursor: none !important;
}

.nm-cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 160ms ease;
}

.nm-cursor.is-on {
  opacity: 1;
}

.nm-cursor-dot,
.nm-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.nm-cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--c-accent);
  box-shadow: 0 0 0 2px rgba(10, 18, 24, 0.55);
}

.nm-cursor-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(62, 207, 190, 0.55);
  background: rgba(62, 207, 190, 0.08);
  transition: width 160ms ease, height 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nm-cursor.is-hover .nm-cursor-ring {
  width: 46px;
  height: 46px;
  background: rgba(62, 207, 190, 0.16);
  border-color: rgba(62, 207, 190, 0.85);
}

.nm-cursor.is-down .nm-cursor-ring {
  width: 28px;
  height: 28px;
  background: rgba(62, 207, 190, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .nm-has-cursor,
  .nm-has-cursor * {
    cursor: auto !important;
  }

  .nm-cursor {
    display: none !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .nm-has-cursor,
  .nm-has-cursor * {
    cursor: auto !important;
  }

  .nm-cursor {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .nm-code-hero {
    grid-template-columns: 1fr;
    padding-top: 7rem;
  }

  .nm-code-photo {
    order: -1;
  }

  .nm-code-window-body img {
    height: min(42vh, 340px);
  }

  .nm-code-contact-grid {
    grid-template-columns: 1fr;
  }

  .nm-code-pulse-list a {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .nm-code-shell {
    width: 100%;
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px) + 0.75rem);
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px) + 0.75rem);
  }

  .nm-code-top {
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px) + 0.75rem);
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px) + 0.75rem);
  }

  .nm-code-brand {
    font-size: 1.05rem;
    min-width: 0;
    flex: 1 1 auto;
  }

  .nm-code-brand-text,
  .nm-code-brand {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nm-code-nav {
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .nm-code-nav a:not(.nm-code-mail):not(.nm-code-cta) {
    font-size: 0.88rem;
  }

  .nm-code-mail {
    width: 2.2rem;
    height: 2.2rem;
  }

  .nm-code-cta {
    padding: 0.45rem 0.8rem;
    font-size: 0.88rem;
  }

  .nm-blog-list,
  .nm-blog-card,
  .nm-blog-card-link {
    width: 100%;
  }

  .nm-blog-card {
    border-radius: 0.75rem;
  }

  .nm-blog-card:hover {
    transform: none;
  }

  .nm-blog-card-link {
    padding: 1rem 0.95rem 1.05rem;
  }

  .nm-article-title {
    max-width: none;
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .nm-article-hero {
    margin-bottom: 1.35rem;
    padding-bottom: 1.15rem;
  }
}

/* Back to top */
.nm-top-btn {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(62, 207, 190, 0.35);
  border-radius: 999px;
  background: rgba(22, 30, 39, 0.92);
  color: var(--c-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(0.6rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, background 160ms ease, border-color 160ms ease;
}

.nm-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nm-top-btn:hover,
.nm-top-btn:focus-visible {
  background: rgba(30, 42, 52, 0.98);
  border-color: rgba(62, 207, 190, 0.7);
  outline: none;
}

.nm-top-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(62, 207, 190, 0.25), 0 10px 28px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .nm-top-btn {
    transition: none;
  }
}
