@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

body.article-page {
  --page-bg: #edf3f7;
  --page-bg-deep: #e3ebf2;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(244, 248, 252, 0.86);
  --text: #111720;
  --text-soft: #5b6977;
  --text-faint: #768291;
  --line: rgba(91, 111, 131, 0.16);
  --line-strong: rgba(91, 111, 131, 0.26);
  --accent: #7da5c6;
  --accent-strong: #426988;
  --accent-glow: rgba(143, 209, 255, 0.4);
  --code-bg: #edf3f8;
  --code-text: #193247;
  --code-panel: #101820;
  --code-panel-text: #e7f1fb;
  --shadow: 0 28px 80px rgba(92, 108, 126, 0.16);
  min-height: 100%;
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.78;
  letter-spacing: -0.012em;
  background:
    radial-gradient(circle at top right, rgba(143, 209, 255, 0.28), transparent 28%),
    radial-gradient(circle at 0% 10%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(180deg, #f9fbfd 0%, var(--page-bg) 48%, var(--page-bg-deep) 100%);
}

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

body.article-page::before {
  background:
    linear-gradient(rgba(125, 165, 198, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 165, 198, 0.08) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.45;
}

body.article-page::after {
  background:
    radial-gradient(circle at 78% 12%, rgba(143, 209, 255, 0.28), transparent 16%),
    radial-gradient(circle at 24% 76%, rgba(255, 255, 255, 0.8), transparent 24%);
  opacity: 0.9;
}

body.article-page .frame {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  padding: 40px 28px 96px;
}

body.article-page .article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(247, 250, 253, 0.82)),
    rgba(255, 255, 255, 0.7);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
}

body.article-page .article::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(143, 209, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 32%);
  pointer-events: none;
}

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

body.article-page .hero {
  position: relative;
  padding: 58px 68px 36px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 0%, rgba(143, 209, 255, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(243, 248, 252, 0.46));
}

body.article-page .hero::before {
  content: "";
  position: absolute;
  top: -72px;
  right: -36px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(143, 209, 255, 0.08) 42%, transparent 68%);
  filter: blur(10px);
  opacity: 0.72;
  pointer-events: none;
}

body.article-page .hero::after {
  content: "";
  position: absolute;
  left: 68px;
  right: 68px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 111, 131, 0.2) 12%, rgba(91, 111, 131, 0.2) 88%, transparent);
}

body.article-page .back,
body.article-page .hero-pill,
body.article-page .meta,
body.article-page .media-label,
body.article-page th {
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

body.article-page .back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

body.article-page .back::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

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

body.article-page h1 {
  margin: 0;
  max-width: 11ch;
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.1rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

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 {
  margin: 22px 0 0;
  max-width: 39rem;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.78;
}

body.article-page .hero-quick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body.article-page .hero-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(66, 105, 136, 0.14);
  border-radius: 999px;
  padding: 8px 14px;
  color: #5c6f82;
  background: rgba(255, 255, 255, 0.66);
  box-shadow:
    0 10px 26px rgba(117, 137, 160, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.article-page .meta {
  margin-top: 24px;
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.article-page .content {
  padding: 48px 68px 72px;
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.34), rgba(245, 249, 252, 0.56));
}

body.article-page h2 {
  margin: 60px auto 18px;
  max-width: 46rem;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #131c25;
  font-family: "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

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

body.article-page p {
  margin-bottom: 18px;
  color: #17212b;
  font-size: 1.04rem;
  line-height: 1.84;
}

body.article-page strong {
  color: #0d141c;
}

body.article-page ul,
body.article-page ol {
  margin-top: 14px;
  margin-bottom: 24px;
  padding-left: 0;
  list-style: none;
}

body.article-page li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 1.3rem;
  color: #17212b;
}

body.article-page li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #91c7f2, #739cbe);
  box-shadow: 0 0 0 4px rgba(143, 209, 255, 0.14);
}

body.article-page a {
  color: #33526d;
  text-decoration: none;
  border-bottom: 1px solid rgba(66, 105, 136, 0.24);
}

body.article-page a:hover {
  color: #18324a;
  border-bottom-color: rgba(66, 105, 136, 0.46);
}

body.article-page code {
  padding: 0.22em 0.58em;
  border: 1px solid rgba(66, 105, 136, 0.14);
  border-radius: 999px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}

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 {
  position: relative;
  max-width: 52rem;
  margin: 24px auto 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(244, 248, 251, 0.82));
  box-shadow:
    0 18px 42px rgba(103, 121, 141, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.article-page pre::before,
body.article-page .compare::before,
body.article-page .media-shot::before,
body.article-page .diagram-card::before,
body.article-page .note::before,
body.article-page .media-slot::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(91, 111, 131, 0.08);
  border-radius: 18px;
  pointer-events: none;
}

body.article-page pre {
  padding: 20px 22px;
  border-color: rgba(16, 24, 32, 0.08);
  background: linear-gradient(180deg, #101820, #121c27);
  box-shadow: 0 24px 54px rgba(13, 25, 36, 0.18);
  overflow-x: auto;
}

body.article-page pre::before {
  border-color: rgba(231, 241, 251, 0.06);
}

body.article-page pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--code-panel-text);
  font-size: 0.92rem;
}

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 rgba(91, 111, 131, 0.12);
}

body.article-page th {
  color: #56697b;
  background: rgba(236, 242, 247, 0.94);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

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

body.article-page .media-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(66, 105, 136, 0.16);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(18, 33, 48, 0.14);
}

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

body.article-page .note {
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(243, 248, 252, 0.96), rgba(232, 240, 247, 0.92));
  color: #344250;
}

body.article-page .diagram-card-inner {
  overflow: hidden;
  border: 1px solid rgba(66, 105, 136, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.96), rgba(239, 245, 249, 0.96));
}

body.article-page .mermaid {
  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;
  background: linear-gradient(180deg, rgba(244, 249, 252, 0.96), rgba(235, 242, 247, 0.92));
}

body.article-page .media-label {
  margin: 0 0 8px;
  color: #556778;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.article-page .media-hint {
  margin: 0;
  max-width: none;
  color: #667686;
}

body.article-page blockquote {
  padding: 18px 20px;
  border-left: 2px solid rgba(66, 105, 136, 0.2);
  color: #41505f;
  background: rgba(255, 255, 255, 0.46);
  border-radius: 0 20px 20px 0;
}

body.article-page ::selection {
  color: #0f1720;
  background: rgba(143, 209, 255, 0.32);
}

@media (max-width: 760px) {
  body.article-page .frame {
    padding: 22px 14px 72px;
  }

  body.article-page .article {
    border-radius: 26px;
  }

  body.article-page .hero {
    padding: 34px 22px 24px;
  }

  body.article-page .hero::after {
    left: 22px;
    right: 22px;
  }

  body.article-page h1 {
    max-width: 12ch;
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }

  body.article-page .deck {
    font-size: 1rem;
  }

  body.article-page .content {
    padding: 34px 22px 42px;
  }

  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 {
    max-width: none;
  }

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

body.listing-page,
body.home-page {
  --page-bg: #edf3f7;
  --page-bg-deep: #e3ebf2;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #111720;
  --text-soft: #5b6977;
  --text-faint: #768291;
  --line: rgba(91, 111, 131, 0.16);
  --line-strong: rgba(91, 111, 131, 0.24);
  --accent: #7da5c6;
  --accent-strong: #426988;
  --accent-glow: rgba(143, 209, 255, 0.4);
  --shadow: 0 28px 80px rgba(92, 108, 126, 0.16);
  min-height: 100%;
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.78;
  letter-spacing: -0.012em;
  background:
    radial-gradient(circle at top right, rgba(143, 209, 255, 0.28), transparent 28%),
    radial-gradient(circle at 0% 10%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(180deg, #f9fbfd 0%, var(--page-bg) 48%, var(--page-bg-deep) 100%);
}

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.listing-page::before,
body.home-page::before {
  background:
    linear-gradient(rgba(125, 165, 198, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 165, 198, 0.08) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.45;
}

body.listing-page::after,
body.home-page::after {
  background:
    radial-gradient(circle at 78% 12%, rgba(143, 209, 255, 0.28), transparent 16%),
    radial-gradient(circle at 24% 76%, rgba(255, 255, 255, 0.8), transparent 24%);
  opacity: 0.9;
}

body.listing-page a,
body.home-page a {
  color: #33526d;
  text-decoration: none;
  border-bottom: 1px solid rgba(66, 105, 136, 0.2);
}

body.listing-page a:hover,
body.home-page a:hover {
  color: #18324a;
  border-bottom-color: rgba(66, 105, 136, 0.44);
}

body.listing-page .frame,
body.home-page .frame {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  padding: 40px 28px 96px;
}

body.listing-page .article,
body.home-page .article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(247, 250, 253, 0.82)),
    rgba(255, 255, 255, 0.7);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
}

body.listing-page .article::before,
body.home-page .article::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(143, 209, 255, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 32%);
  pointer-events: none;
}

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

body.listing-page .hero,
body.home-page .hero {
  position: relative;
  padding: 44px 54px 34px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 0%, rgba(143, 209, 255, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(243, 248, 252, 0.46));
}

body.listing-page .hero::before,
body.home-page .hero::before {
  content: "";
  position: absolute;
  top: -72px;
  right: -36px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(143, 209, 255, 0.08) 42%, transparent 68%);
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
}

body.listing-page .hero::after,
body.home-page .hero::after {
  content: "";
  position: absolute;
  left: 54px;
  right: 54px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 111, 131, 0.2) 12%, rgba(91, 111, 131, 0.2) 88%, transparent);
}

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

body.listing-page .hero-link,
body.home-page .hero-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(66, 105, 136, 0.14);
  border-radius: 999px;
  padding: 8px 14px;
  color: #5c6f82;
  background: rgba(255, 255, 255, 0.66);
  box-shadow:
    0 10px 26px rgba(117, 137, 160, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(66, 105, 136, 0.14);
}

body.listing-page .hero-link:hover,
body.home-page .hero-link:hover {
  color: var(--accent-strong);
  border-color: rgba(66, 105, 136, 0.26);
}

body.listing-page h1,
body.home-page h1 {
  margin: 0;
  max-width: 10ch;
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.9rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

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

body.listing-page .deck,
body.home-page .deck {
  margin: 18px 0 0;
  max-width: 38rem;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.78;
}

body.listing-page .content,
body.home-page .content {
  padding: 30px;
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.34), rgba(245, 249, 252, 0.56));
}

body.listing-page .post-list,
body.home-page .post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
}

body.listing-page .post,
body.home-page .post {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(243, 248, 251, 0.8));
  box-shadow:
    0 18px 42px rgba(103, 121, 141, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.listing-page .post::before,
body.home-page .post::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(91, 111, 131, 0.08);
  border-radius: 16px;
  pointer-events: none;
}

body.listing-page .post::after,
body.home-page .post::after {
  content: "";
  position: absolute;
  top: -18px;
  right: -18px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 209, 255, 0.2) 0%, rgba(143, 209, 255, 0.04) 48%, transparent 74%);
  pointer-events: none;
}

body.listing-page .post-title,
body.home-page .post-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #131c25;
  font-family: "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.04em;
}

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-top: 10px;
  color: var(--text-faint);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.listing-page ::selection,
body.home-page ::selection {
  color: #0f1720;
  background: rgba(143, 209, 255, 0.32);
}

@media (max-width: 760px) {
  body.listing-page .frame,
  body.home-page .frame {
    padding: 22px 14px 72px;
  }

  body.listing-page .article,
  body.home-page .article {
    border-radius: 26px;
  }

  body.listing-page .hero,
  body.home-page .hero {
    padding: 32px 22px 24px;
  }

  body.listing-page .hero::after,
  body.home-page .hero::after {
    left: 22px;
    right: 22px;
  }

  body.listing-page h1,
  body.home-page h1 {
    max-width: 11ch;
    font-size: clamp(2.3rem, 12vw, 3.7rem);
  }

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

  body.listing-page .deck,
  body.home-page .deck {
    font-size: 1rem;
  }

  body.listing-page .content,
  body.home-page .content {
    padding: 20px 16px 26px;
  }

  body.listing-page .post,
  body.home-page .post {
    padding: 18px 18px 16px;
    border-radius: 20px;
  }
}
