/* Graphite/silver site system, adapted from the IngressLabs brandbook. */

:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #0a0a0c;
  --elevated: #101014;
  --surface-soft: #0d1015;
  --text: #ffffff;
  --muted: #a0a0aa;
  --muted-strong: #b8bdc4;
  --accent: #b8bdc4;
  --accent-strong: #edf1f5;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(237, 241, 245, 0.24);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.article-page,
body.listing-page,
body.home-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.75;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

body.article-page::before,
body.article-page::after,
body.listing-page::before,
body.listing-page::after,
body.home-page::before,
body.home-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.article-page::before,
body.listing-page::before,
body.home-page::before {
  z-index: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.034) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.54;
}

body.article-page::after,
body.listing-page::after,
body.home-page::after {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.36), rgba(5, 5, 5, 0.96)),
    url("/assets/ingresslabs/graphite-routing-pattern.svg") center top / min(1200px, 100vw) auto no-repeat;
  opacity: 0.34;
}

body.article-page a,
body.listing-page a,
body.home-page a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 189, 196, 0.32);
}

body.article-page a:hover,
body.listing-page a:hover,
body.home-page a:hover {
  color: #ffffff;
  border-bottom-color: rgba(237, 241, 245, 0.72);
}

body.article-page ::selection,
body.listing-page ::selection,
body.home-page ::selection {
  color: var(--bg);
  background: rgba(237, 241, 245, 0.72);
}

body.article-page .frame,
body.listing-page .frame,
body.home-page .frame {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
}

/* Article pages */

body.article-page .frame {
  padding: 32px 0 88px;
}

body.article-page .article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(16, 16, 20, 0.96), rgba(10, 10, 12, 0.9)),
    var(--surface);
  box-shadow: var(--shadow);
}

body.article-page .article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 241, 245, 0.62), transparent);
  pointer-events: none;
}

body.article-page .article > * {
  position: relative;
  z-index: 1;
}

body.article-page .hero,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .hero {
  position: relative;
  padding: clamp(40px, 7vw, 78px) clamp(24px, 6vw, 72px) clamp(28px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(237, 241, 245, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(16, 16, 20, 0.96), rgba(10, 10, 12, 0.72));
}

body.article-page .hero::before,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(237, 241, 245, 0.11), transparent 24%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  opacity: 0.72;
  pointer-events: none;
}

body.article-page .back,
body.article-page .media-label,
body.article-page th,
body.article-page .kpi-label,
body.article-page .post-meta {
  font-family: var(--font-mono);
}

body.article-page .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 42px;
  height: 42px;
  margin: 0 0 30px;
  padding: 0;
  border: 1px solid rgba(237, 241, 245, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(237, 241, 245, 0.1), rgba(184, 189, 196, 0.035)),
    rgba(10, 12, 16, 0.78);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #d7dce3;
  font-size: 0;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  border-bottom: 0;
  transition:
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease,
    background-color 0.22s ease,
    box-shadow 0.22s ease;
}

body.article-page .back::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 20px;
  width: 15px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.9;
}

body.article-page .back::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 16px;
  width: 8.5px;
  height: 8.5px;
  border-left: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg);
}

body.article-page .back:hover {
  border-color: rgba(237, 241, 245, 0.34);
  background:
    linear-gradient(180deg, rgba(237, 241, 245, 0.16), rgba(184, 189, 196, 0.055)),
    rgba(12, 15, 20, 0.9);
  color: #ffffff;
  transform: translateX(-2px);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.article-page .back:focus-visible {
  outline: 2px solid rgba(237, 241, 245, 0.42);
  outline-offset: 4px;
}

body.article-page h1 {
  max-width: 15ch;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

body.article-page h1 code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong);
  font-family: inherit;
  font-size: 0.92em;
  font-weight: inherit;
}

body.article-page .deck {
  max-width: 43rem;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.68;
  text-wrap: pretty;
}

body.article-page .content,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .content {
  padding: clamp(34px, 5vw, 58px) clamp(24px, 6vw, 72px) clamp(48px, 7vw, 80px);
  background: linear-gradient(180deg, rgba(13, 16, 21, 0.58), rgba(5, 5, 5, 0.36));
}

body.article-page h2 {
  max-width: 48rem;
  margin: 58px auto 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

body.article-page h2:first-child {
  margin-top: 0;
}

body.article-page p,
body.article-page ul,
body.article-page ol,
body.article-page blockquote {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

body.article-page p,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .content p {
  margin-top: 0;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.84;
}

body.article-page .lead,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .lead {
  color: var(--accent-strong);
  font-size: clamp(1.08rem, 1.7vw, 1.26rem);
  line-height: 1.72;
}

body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .lead::after {
  background: linear-gradient(90deg, rgba(237, 241, 245, 0.72), transparent);
}

body.article-page strong {
  color: var(--accent-strong);
}

body.article-page ul {
  padding-left: 0;
  list-style: none;
}

body.article-page ol {
  padding-left: 1.45rem;
}

body.article-page ul,
body.article-page ol {
  margin-top: 14px;
  margin-bottom: 24px;
}

body.article-page li {
  position: relative;
  margin-bottom: 12px;
  color: var(--text);
}

body.article-page ul > li {
  padding-left: 1.35rem;
}

body.article-page ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.24rem rgba(184, 189, 196, 0.08);
}

body.article-page code {
  padding: 0.2em 0.5em;
  border: 1px solid rgba(184, 189, 196, 0.2);
  border-radius: 999px;
  background: rgba(184, 189, 196, 0.09);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.9em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.article-page pre,
body.article-page .compare,
body.article-page .media-shot,
body.article-page .diagram-card,
body.article-page .note,
body.article-page .media-slot,
body.article-page .callout,
body.article-page .agent-card,
body.article-page .terminal-card,
body.article-page .example-intro,
body.article-page .after-example,
body.article-page .canvas-shot,
body.article-page .terminal-shot {
  position: relative;
  max-width: 54rem;
  margin: 26px auto 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(16, 16, 20, 0.96), rgba(10, 10, 12, 0.9)),
    var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 46px rgba(0, 0, 0, 0.22);
}

body.article-page pre {
  padding: 20px 22px;
  overflow-x: auto;
}

body.article-page pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f7f9fb;
  font-size: 0.92rem;
  overflow-wrap: normal;
  word-break: normal;
  white-space: pre;
}

body.article-page .compare {
  overflow: hidden;
}

body.article-page table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-size: 0.95rem;
}

body.article-page th,
body.article-page td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

body.article-page th {
  color: var(--accent-strong);
  background: rgba(237, 241, 245, 0.045);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.article-page tr:last-child td {
  border-bottom: 0;
}

body.article-page .media-shot,
body.article-page .diagram-card,
body.article-page .canvas-shot,
body.article-page .terminal-shot {
  padding: 12px;
}

body.article-page .media-shot img,
body.article-page .media-shot video,
body.article-page .canvas-shot img,
body.article-page .terminal-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

body.article-page .media-shot figcaption,
body.article-page .diagram-card figcaption {
  margin: 0;
  padding: 14px 4px 2px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

body.article-page .note,
body.article-page .callout,
body.article-page .agent-card,
body.article-page .terminal-card,
body.article-page .example-intro,
body.article-page .after-example {
  padding: 18px 20px;
  color: var(--muted-strong);
}

body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .agent-card,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .terminal-card,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .example-intro,
body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .after-example {
  border-color: var(--border);
  background:
    linear-gradient(180deg, rgba(16, 16, 20, 0.96), rgba(10, 10, 12, 0.9)),
    var(--surface);
  color: var(--muted-strong);
}

body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .agent-card::after,
body.article-page:is(.vpn-post, .security-agent-post) .terminal-card::after {
  background:
    radial-gradient(circle at 5px 5px, rgba(237, 241, 245, 0.95) 0 3px, transparent 3.5px),
    radial-gradient(circle at 22px 5px, rgba(184, 189, 196, 0.84) 0 3px, transparent 3.5px),
    radial-gradient(circle at 39px 5px, rgba(160, 160, 170, 0.7) 0 3px, transparent 3.5px);
}

body.article-page .diagram-card-inner {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 16, 21, 0.96), rgba(5, 5, 5, 0.96));
}

body.article-page .mermaid {
  max-width: none;
  margin: 0;
  padding: 20px 18px 10px;
  background: transparent;
  overflow-x: auto;
}

body.article-page .mermaid svg {
  display: block;
  max-width: 100%;
  height: auto;
}

body.article-page .media-slot {
  padding: 18px 20px;
  border-style: dashed;
}

body.article-page .media-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.article-page .media-hint {
  max-width: none;
  margin: 0;
  color: var(--muted-strong);
}

body.article-page blockquote {
  padding: 18px 20px;
  border-left: 2px solid rgba(237, 241, 245, 0.42);
  color: var(--muted-strong);
  background: rgba(237, 241, 245, 0.055);
  border-radius: 0 var(--radius) var(--radius) 0;
}

body.article-page .kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 54rem;
  margin: 24px auto 28px;
}

body.article-page .kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: rgba(237, 241, 245, 0.045);
}

body.article-page .kpi-label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
}

body.article-page .kpi-value {
  display: block;
  margin-top: 8px;
  color: var(--accent-strong);
  font-size: 2rem;
  line-height: 1;
}

body.article-page .result-match {
  color: #cfd5dd;
}

body.article-page .result-miss {
  color: #d8b8b8;
}

body.article-page .result-partial {
  color: #d8d0b8;
}

body.article-page .refs li {
  word-break: break-word;
}

body.article-page.widget-post .story-gallery,
body.article-page.widget-post .idea-cells-gallery {
  max-width: 62rem;
  margin: 26px auto 32px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(237, 241, 245, 0.045);
}

body.article-page.widget-post .story-gallery img,
body.article-page.widget-post .idea-cells-gallery img {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

body.article-page.widget-post .media-note {
  color: var(--muted);
}

body.article-page.widget-post .image-lightbox[open] {
  background: rgba(5, 5, 5, 0.88);
}

body.article-page.widget-post .image-lightbox img {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

body.article-page.widget-post .image-lightbox-close {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 16, 20, 0.96);
  color: var(--text);
}

/* Listing and home pages */

body.listing-page .frame,
body.home-page .frame {
  padding: 40px 0 96px;
}

body.listing-page .article,
body.home-page .article {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.listing-page .hero,
body.home-page .hero {
  position: relative;
  padding: clamp(72px, 11vw, 132px) 0 clamp(44px, 8vw, 88px);
  border-bottom: 1px solid var(--border);
  background: transparent;
}

body.listing-page .hero-compact {
  padding-bottom: clamp(36px, 6vw, 64px);
}

body.listing-page .archive-nav {
  padding: 40px 0 26px;
}

body.listing-page .hero-actions,
body.home-page .hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 30px;
}

body.listing-page .hero-link,
body.home-page .hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}

body.listing-page .hero-link::after,
body.home-page .hero-link::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.58;
}

body.listing-page .hero-link:hover,
body.home-page .hero-link:hover {
  color: var(--accent-strong);
  border-bottom-color: rgba(237, 241, 245, 0.42);
}

body.listing-page .hero-grid,
body.home-page .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: end;
}

body.listing-page .hero-copy,
body.home-page .hero-copy {
  min-width: 0;
}

body.listing-page .status-pill,
body.home-page .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 24px;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(184, 189, 196, 0.2);
  border-radius: 999px;
  background: rgba(184, 189, 196, 0.08);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.listing-page .status-pill::before,
body.home-page .status-pill::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(184, 189, 196, 0.12);
}

body.listing-page h1,
body.home-page h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

body.home-page h1 {
  max-width: 8ch;
}

body.listing-page .deck,
body.home-page .deck {
  max-width: 42rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.6;
  text-wrap: pretty;
}

body.listing-page .hero-card,
body.home-page .hero-card {
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.16), rgba(5, 5, 5, 0.72)),
    url("/assets/ingresslabs/graphite-routing-pattern.svg") center / cover no-repeat,
    var(--surface);
  box-shadow: var(--shadow);
}

body.listing-page .hero-card h2,
body.home-page .hero-card h2 {
  margin: 0;
  max-width: 14ch;
  color: var(--text);
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  font-weight: 500;
  line-height: 1.1;
}

body.listing-page .hero-card p,
body.home-page .hero-card p {
  max-width: 26rem;
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 0.98rem;
  line-height: 1.65;
}

body.listing-page .content,
body.home-page .content {
  padding: clamp(36px, 6vw, 64px) 0 0;
  background: transparent;
}

body.listing-page .archive-nav + .content {
  padding-top: 28px;
}

body.listing-page .section-kicker,
body.home-page .section-kicker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 26px;
}

body.listing-page .section-kicker h2,
body.home-page .section-kicker h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.1;
}

body.listing-page .section-kicker p,
body.home-page .section-kicker p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

body.listing-page .post-list,
body.home-page .post-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

body.listing-page .post,
body.home-page .post {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

body.listing-page .post::before,
body.home-page .post::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 0;
  height: 1px;
  background: var(--accent-strong);
  transition: width 0.28s ease;
}

body.listing-page .post:hover::before,
body.home-page .post:hover::before {
  width: 100%;
}

body.listing-page .post-title,
body.home-page .post-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1.03rem, 1.7vw, 1.28rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

body.listing-page .post-title a,
body.home-page .post-title a {
  color: inherit;
  border-bottom: 0;
}

body.listing-page .post-meta,
body.home-page .post-meta {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 920px) {
  body.article-page .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.listing-page .hero-grid,
  body.home-page .hero-grid,
  body.listing-page .section-kicker,
  body.home-page .section-kicker {
    grid-template-columns: 1fr;
  }

  body.listing-page .hero-card,
  body.home-page .hero-card {
    min-height: 220px;
  }
}

@media (max-width: 760px) {
  body.article-page .frame,
  body.listing-page .frame,
  body.home-page .frame {
    width: min(calc(100% - 28px), 1180px);
  }

  body.article-page .frame {
    padding: 18px 0 68px;
  }

  body.article-page .hero,
  body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .hero {
    padding: 32px 20px 26px;
  }

  body.article-page h1 {
    max-width: 13ch;
    font-size: clamp(2.25rem, 11vw, 3.7rem);
  }

  body.article-page .content,
  body.article-page:is(.widget-post, .vpn-post, .security-agent-post) .content {
    padding: 32px 20px 44px;
  }

  body.article-page h2,
  body.article-page p,
  body.article-page ul,
  body.article-page ol,
  body.article-page blockquote,
  body.article-page pre,
  body.article-page .compare,
  body.article-page .media-shot,
  body.article-page .diagram-card,
  body.article-page .note,
  body.article-page .media-slot,
  body.article-page .callout,
  body.article-page .agent-card,
  body.article-page .terminal-card,
  body.article-page .example-intro,
  body.article-page .after-example,
  body.article-page .canvas-shot,
  body.article-page .terminal-shot {
    max-width: none;
  }

  body.article-page .kpi-grid {
    grid-template-columns: 1fr;
  }

  body.article-page th,
  body.article-page td {
    padding: 12px 14px;
  }

  body.listing-page .frame,
  body.home-page .frame {
    padding: 26px 0 72px;
  }

  body.listing-page .hero,
  body.home-page .hero {
    padding: 54px 0 38px;
  }

  body.listing-page .archive-nav {
    padding: 26px 0 18px;
  }

  body.listing-page h1,
  body.home-page h1 {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }

  body.listing-page .hero-actions,
  body.home-page .hero-actions {
    gap: 14px;
    margin-bottom: 24px;
  }

  body.listing-page .post,
  body.home-page .post {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px 0;
  }

  body.listing-page .post-meta,
  body.home-page .post-meta {
    white-space: normal;
  }
}

/* Resume: simple document layout */

body.resume-page {
  --resume-bg: #15171a;
  --resume-paper: #eef0f1;
  --resume-ink: #11141a;
  --resume-muted: #56606b;
  --resume-faint: #737d88;
  --resume-line: rgba(24, 29, 35, 0.16);
  --resume-accent: #222832;
  --resume-accent-soft: #dfe3e6;
  --resume-accent-dark: #0d1015;
  min-height: 100vh;
  margin: 0;
  color: var(--resume-ink);
  background:
    linear-gradient(145deg, #0c0e11 0%, #191d22 46%, #4f565d 100%);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Inter",
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.resume-page::before,
body.resume-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.resume-page::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 26%, rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 32px);
  opacity: 0.42;
}

body.resume-page::after {
  display: none;
}

body.resume-page a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(51, 65, 85, 0.24);
}

body.resume-page a:hover {
  color: var(--resume-accent-dark);
  border-bottom-color: rgba(51, 65, 85, 0.56);
}

body.resume-page p,
body.resume-page ul,
body.resume-page ol,
body.resume-page h1,
body.resume-page h2,
body.resume-page h3 {
  margin: 0;
}

body.resume-page [data-lang] {
  display: none !important;
}

body.resume-page[data-resume-lang="en"] span[data-lang="en"],
body.resume-page[data-resume-lang="ru"] span[data-lang="ru"] {
  display: inline !important;
}

body.resume-page[data-resume-lang="en"] small[data-lang="en"],
body.resume-page[data-resume-lang="ru"] small[data-lang="ru"] {
  display: block !important;
}

body.resume-page[data-resume-lang="en"] p[data-lang="en"],
body.resume-page[data-resume-lang="ru"] p[data-lang="ru"] {
  display: block !important;
}

body.resume-page[data-resume-lang="en"] ul[data-lang="en"],
body.resume-page[data-resume-lang="ru"] ul[data-lang="ru"] {
  display: grid !important;
}

body.resume-page .resume-wrap {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), 1080px);
  margin: 0 auto;
  padding: 2rem 0;
}

body.resume-page .resume-document {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 1.25rem;
  min-height: calc(100vh - 4rem);
  padding: 2.85rem;
  border: 1px solid rgba(246, 248, 249, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.46), transparent 16%, rgba(8, 10, 14, 0.035) 38%, transparent 64%, rgba(255, 255, 255, 0.32)),
    repeating-linear-gradient(132deg, rgba(255, 255, 255, 0.055) 0 1px, rgba(12, 15, 19, 0.008) 1px 2px, transparent 2px 10px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(226, 230, 233, 0.94) 54%, rgba(250, 251, 252, 0.98) 100%),
    var(--resume-paper);
  box-shadow:
    0 30px 82px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(12, 14, 17, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(12, 14, 17, 0.08);
}

body.resume-page .resume-document::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 8px),
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.52), transparent 26%),
    radial-gradient(circle at 86% 0%, rgba(18, 22, 28, 0.08), transparent 30%);
  opacity: 0.28;
}

body.resume-page .resume-document > * {
  position: relative;
  z-index: 1;
}

body.resume-page .resume-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.8rem;
  align-items: start;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--resume-line);
}

body.resume-page .resume-identity {
  min-width: 0;
}

body.resume-page .resume-title-lockup {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  min-width: 0;
  filter: drop-shadow(0 12px 18px rgba(16, 20, 26, 0.08));
}

body.resume-page .resume-name-block {
  display: grid;
  flex: 1 1 auto;
  gap: 1rem;
  min-width: 0;
}

body.resume-page .resume-home {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--resume-muted);
  border-bottom: 0;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.resume-page .resume-header h1 {
  position: relative;
  max-width: 12ch;
  color: var(--resume-ink);
  background: none;
  font-family: inherit;
  font-size: 4.75rem;
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: 0;
  white-space: nowrap;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  text-shadow: none;
  filter: none;
}

body.resume-page .resume-role {
  max-width: 48rem;
  color: var(--resume-muted);
  font-size: 0.92rem;
  font-weight: 640;
  line-height: 1.38;
}

body.resume-page .resume-actions {
  display: grid;
  justify-items: end;
  gap: 0.9rem;
}

body.resume-page .resume-mark {
  display: inline-flex;
  flex: none;
  width: 5rem;
  height: 5rem;
  border: 1px solid rgba(246, 248, 249, 0.5);
  border-radius: 16px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0) 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(9, 11, 15, 0.22) 62%, rgba(255, 255, 255, 0.08)),
    #101319;
  box-shadow:
    0 18px 34px rgba(8, 10, 14, 0.26),
    0 0 0 1px rgba(8, 10, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -14px 26px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  border-bottom: 1px solid rgba(246, 248, 249, 0.42);
  transform: perspective(420px) rotateX(4deg) rotateY(-6deg);
  transform-origin: center;
}

body.resume-page .resume-mark img {
  display: block;
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.22))
    drop-shadow(0 12px 18px rgba(0, 0, 0, 0.32));
}

body.resume-page .resume-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

body.resume-page .resume-lang-switch {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid rgba(18, 22, 28, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(196, 203, 209, 0.5)),
    #dfe4e8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(20, 24, 30, 0.12),
    0 10px 22px rgba(24, 29, 35, 0.1);
}

body.resume-page .resume-lang-switch button {
  min-width: 2.05rem;
  height: 2.08rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--resume-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 760;
}

body.resume-page .resume-lang-switch button.is-active {
  background:
    linear-gradient(180deg, #ffffff, #e8edf0);
  color: var(--resume-ink);
  box-shadow:
    0 5px 10px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(15, 18, 23, 0.1);
}

body.resume-page .resume-pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.16rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(246, 248, 249, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.03) 42%, rgba(0, 0, 0, 0.18)),
    #11161d;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

body.resume-page .resume-pdf-button svg {
  width: 0.82rem;
  height: 0.82rem;
}

body.resume-page .resume-pdf-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 44%, rgba(0, 0, 0, 0.14)),
    #171d25;
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(15, 23, 42, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

body.resume-page .resume-pdf-button:focus-visible {
  outline: 3px solid rgba(126, 137, 148, 0.28);
  outline-offset: 3px;
}

body.resume-page .resume-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 1rem;
  max-width: 18rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.resume-page .resume-links a {
  color: var(--resume-muted);
  border-bottom-color: transparent;
}

body.resume-page .resume-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--resume-line);
  color: var(--resume-muted);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0;
}

body.resume-page .resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 1.9rem;
  align-items: start;
}

body.resume-page .resume-main,
body.resume-page .resume-side {
  display: grid;
  gap: 1.05rem;
  min-width: 0;
}

body.resume-page .resume-block {
  display: grid;
  gap: 0.62rem;
}

body.resume-page .resume-block h2 {
  color: var(--resume-faint);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.resume-page .resume-block p {
  color: var(--resume-ink);
  font-size: 1rem;
  line-height: 1.66;
}

body.resume-page .resume-side {
  padding-left: 1.8rem;
  border-left: 1px solid var(--resume-line);
}

body.resume-page .resume-current-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(24, 29, 35, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(214, 220, 224, 0.34)),
    repeating-linear-gradient(132deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 7px),
    #f1f4f6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(15, 18, 23, 0.06),
    0 12px 24px rgba(24, 29, 35, 0.055);
}

body.resume-page .resume-current-card > a {
  width: fit-content;
  color: var(--resume-accent-dark);
  border-bottom-color: rgba(24, 29, 35, 0.26);
  font-size: 1.15rem;
  font-weight: 780;
}

body.resume-page .resume-current-card p {
  color: var(--resume-muted);
}

body.resume-page .resume-tags,
body.resume-page .resume-list {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}

body.resume-page .resume-tags {
  grid-template-columns: 1fr;
}

body.resume-page .resume-tags li,
body.resume-page .resume-list li {
  min-width: 0;
  color: var(--resume-muted);
}

body.resume-page .resume-tags li {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(24, 29, 35, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(205, 212, 217, 0.48)),
    var(--resume-accent-soft);
  color: var(--resume-accent-dark);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

body.resume-page .resume-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

body.resume-page .resume-list li::before {
  content: "";
  position: absolute;
  top: 0.64rem;
  left: 0;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--resume-accent);
}

body.resume-page .resume-writing {
  display: grid;
  border-top: 1px solid var(--resume-line);
}

body.resume-page .resume-writing a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--resume-line);
  color: var(--resume-ink);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.35;
}

body.resume-page .resume-writing a::after {
  content: "->";
  flex: none;
  color: var(--resume-accent);
  font-family: inherit;
  font-size: 0.8rem;
}

body.resume-page .resume-project-links {
  display: grid;
  border-top: 1px solid rgba(18, 22, 28, 0.22);
}

body.resume-page .resume-project-links a {
  display: grid;
  gap: 0.22rem;
  padding: 0.62rem 0.05rem 0.62rem 0;
  border-bottom: 1px solid rgba(18, 22, 28, 0.16);
  color: var(--resume-ink);
  font-size: 0.94rem;
  font-weight: 720;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

body.resume-page .resume-project-links a:hover {
  color: var(--resume-accent-dark);
  border-bottom-color: rgba(18, 22, 28, 0.26);
}

body.resume-page .resume-project-links small {
  color: var(--resume-muted);
  font-size: 0.76rem;
  font-weight: 560;
  line-height: 1.32;
}

@media (max-width: 900px) {
  body.resume-page .resume-wrap {
    width: min(calc(100% - 1rem), 1080px);
    padding: 0.5rem 0;
  }

  body.resume-page .resume-document {
    min-height: calc(100vh - 1rem);
    padding: 1.55rem;
  }

  body.resume-page .resume-header,
  body.resume-page .resume-grid {
    grid-template-columns: 1fr;
  }

  body.resume-page .resume-actions,
  body.resume-page .resume-links {
    justify-items: start;
    justify-content: flex-start;
  }

  body.resume-page .resume-action-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  body.resume-page .resume-title-lockup {
    gap: 0.95rem;
  }

  body.resume-page .resume-header h1 {
    font-size: 3.75rem;
  }

  body.resume-page .resume-role {
    max-width: 38rem;
  }

  body.resume-page .resume-mark {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 14px;
  }

  body.resume-page .resume-side {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 620px) {
  body.resume-page .resume-document {
    padding: 1.05rem;
  }

  body.resume-page .resume-title-lockup {
    display: grid;
    grid-template-columns: 3.35rem minmax(0, 1fr);
    gap: 0.7rem 0.75rem;
    align-items: center;
  }

  body.resume-page .resume-name-block {
    display: contents;
  }

  body.resume-page .resume-header h1 {
    grid-column: 2;
    font-size: 2.38rem;
    line-height: 1.04;
  }

  body.resume-page .resume-role {
    grid-column: 1 / -1;
    max-width: none;
    font-size: 0.86rem;
    line-height: 1.42;
  }

  body.resume-page .resume-mark {
    grid-column: 1;
    width: 3.35rem;
    height: 3.35rem;
    margin-top: 0;
    border-radius: 12px;
  }

  body.resume-page .resume-actions {
    width: 100%;
  }

  body.resume-page .resume-action-row {
    width: 100%;
  }

  body.resume-page .resume-lang-switch {
    max-width: 100%;
  }

  body.resume-page .resume-tags {
    grid-template-columns: 1fr;
  }

  body.resume-page .resume-pdf-button {
    justify-self: start;
    max-width: none;
    min-width: 0;
    width: auto;
  }
}

@media (max-width: 380px) {
  body.resume-page .resume-title-lockup {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.62rem 0.65rem;
  }

  body.resume-page .resume-header h1 {
    font-size: 2.05rem;
    line-height: 1.04;
  }

  body.resume-page .resume-role {
    font-size: 0.78rem;
    line-height: 1.32;
  }

  body.resume-page .resume-mark {
    width: 3rem;
    height: 3rem;
    margin-top: 0;
  }
}

@media print {
  @page {
    margin: 0.32in;
  }

  body.resume-page {
    background: #ffffff;
    color: #111827;
    font-size: 9pt;
  }

  body.resume-page::before,
  body.resume-page::after {
    display: none !important;
  }

  body.resume-page .resume-wrap {
    width: auto;
    padding: 0;
  }

  body.resume-page .resume-document {
    min-height: auto;
    padding: 0.08in 0.1in;
    border: 0;
    background: #ffffff;
    box-shadow: none;
  }

  body.resume-page .resume-document::before {
    display: none;
  }

  body.resume-page .resume-pdf-button,
  body.resume-page .resume-lang-switch,
  body.resume-page .resume-links {
    display: none !important;
  }

  body.resume-page .resume-header {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 8pt;
  }

  body.resume-page .resume-home {
    display: none;
  }

  body.resume-page .resume-header h1 {
    font-size: 28pt;
    background: none;
    color: #111827;
    -webkit-text-fill-color: #111827;
    -webkit-text-stroke: 0;
    text-shadow: none;
    filter: none;
  }

  body.resume-page .resume-title-lockup {
    gap: 7pt;
  }

  body.resume-page .resume-name-block {
    gap: 2pt;
  }

  body.resume-page .resume-role {
    font-size: 7.8pt;
    line-height: 1.18;
  }

  body.resume-page .resume-mark {
    width: 30pt;
    height: 30pt;
    border-radius: 7pt;
    box-shadow: none;
    transform: none;
  }

  body.resume-page .resume-contact-line {
    padding-bottom: 6pt;
    font-size: 7.4pt;
  }

  body.resume-page .resume-grid {
    grid-template-columns: 1.45fr 0.75fr;
    gap: 12pt;
  }

  body.resume-page .resume-main,
  body.resume-page .resume-side {
    gap: 6pt;
  }

  body.resume-page .resume-block {
    break-inside: avoid;
    gap: 3pt;
  }

  body.resume-page .resume-block h2 {
    font-size: 6.6pt;
  }

  body.resume-page .resume-block p,
  body.resume-page .resume-list li {
    font-size: 7.8pt;
    line-height: 1.24;
  }

  body.resume-page .resume-current-card,
  body.resume-page .resume-tags li {
    box-shadow: none;
    background: #ffffff;
  }

  body.resume-page .resume-current-card {
    gap: 3pt;
    padding: 5pt 6pt;
  }

  body.resume-page .resume-current-card > a {
    font-size: 9.6pt;
  }

  body.resume-page .resume-tags li {
    padding: 5pt 6pt;
    font-size: 8.2pt;
  }

  body.resume-page .resume-list {
    gap: 2.4pt;
  }

  body.resume-page .resume-list li {
    padding-left: 8pt;
  }

  body.resume-page .resume-list li::before {
    top: 4.4pt;
    width: 3pt;
    height: 3pt;
  }

  body.resume-page .resume-writing a {
    padding: 2.4pt 0;
    font-size: 7.5pt;
    line-height: 1.13;
  }

  body.resume-page .resume-project-links a {
    gap: 1pt;
    padding: 3pt 0;
    font-size: 7.8pt;
  }

  body.resume-page .resume-project-links small {
    font-size: 6.6pt;
    line-height: 1.15;
  }
}
