/* ========================================
   erickwatson.com — Refined theme
   ======================================== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Variables */
:root {
  --font-body: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-heading: "Inter", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --content-width: 780px;
  --wide-width: 960px;
  --nav-width: 1080px;
  --color-bg: #fcfcfa;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-muted: #6b6b6b;
  --color-faint: #a0a0a0;
  --color-border: #e8e6e1;
  --color-border-light: #f0eee9;
  --color-link: #5218fa;
  --color-link-hover: #3d0fd4;
  --color-accent: #c9a96e;
  --color-tag-bg: #f4f2ed;
  --color-tag-text: #5a5647;
  --color-code-bg: #f6f5f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #191919;
    --color-surface: #222222;
    --color-text: #ddd9d0;
    --color-muted: #9a9590;
    --color-faint: #5a5550;
    --color-border: #333330;
    --color-border-light: #2a2a28;
    --color-link: #818cf8;
    --color-link-hover: #a5b4fc;
    --color-accent: #c9a96e;
    --color-tag-bg: #2a2928;
    --color-tag-text: #b0aa9e;
    --color-code-bg: #242320;
  }
}

/* Base */
html {
  font-size: 18px;
  line-height: 1.75;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  padding: 0;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Layout wrapper */
header, footer { max-width: var(--nav-width); margin: 0 auto; padding: 0 2rem; }
main { max-width: var(--content-width); margin: 0 auto; padding: 0 2rem; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
h1 {
  font-size: 2.4rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
h2 {
  font-size: 1.5rem;
  margin-top: 2.8rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border-light);
}
h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
h4 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.3rem;
}

p { margin-bottom: 1.4rem; }
strong { font-weight: 700; }

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 0.15em;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover {
  color: var(--color-link-hover);
  text-decoration-color: var(--color-link-hover);
}

/* CTA Button */
a.btn, a.btn:visited, a.btn:hover, a.btn:active {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--color-link);
  padding: 0.7em 1.6em;
  border-radius: 6px;
  text-decoration: none !important;
  text-decoration-color: transparent !important;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s;
  margin: 0.5rem 0;
}
a.btn:hover {
  background: var(--color-link-hover);
  transform: translateY(-1px);
}
@media (prefers-color-scheme: dark) {
  a.btn, a.btn:visited, a.btn:hover { background: var(--color-link); color: #fff !important; }
  a.btn:hover { background: var(--color-link-hover); }
}

/* Nav CTA — pill button in header */
a.nav-cta, a.nav-cta:visited {
  color: #fff !important;
  background: var(--color-link);
  padding: 0.3em 1em;
  border-radius: 100px;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background 0.15s;
}
a.nav-cta:hover {
  background: var(--color-link-hover);
  color: #fff !important;
  text-decoration: none !important;
}
@media (prefers-color-scheme: dark) {
  a.nav-cta, a.nav-cta:visited { background: var(--color-link); color: #fff !important; }
  a.nav-cta:hover { background: var(--color-link-hover); }
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--color-tag-bg);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--color-text);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote h1, blockquote h2, blockquote h3 {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--color-text);
  text-transform: none;
  letter-spacing: normal;
}
blockquote h1 { font-size: 1.6rem; line-height: 1.5; }

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--color-code-bg);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--color-border-light);
}
pre {
  background: var(--color-code-bg);
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--color-border-light);
  overflow-x: auto;
  margin: 1.8rem 0;
}
pre code { background: none; padding: 0; border: none; }

ul, ol { padding-left: 1.4rem; margin-bottom: 1.4rem; }
li { margin-bottom: 0.4rem; }
li::marker { color: var(--color-accent); }

/* Horizontal rules */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 3rem 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem -2rem;
  padding: 0 2rem;
  max-width: var(--wide-width);
}
.img-grid img { margin: 0; }
@media (max-width: 600px) {
  .img-grid { grid-template-columns: 1fr; margin: 1.5rem 0; padding: 0; }
}

/* Video embeds */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Skip link */
.skip-link {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}
.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  overflow: visible;
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  z-index: 100;
}

/* Language switcher */
.lang-link {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  padding: 0.2em 0.6em;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  text-decoration: none;
}
.lang-link:hover { background: var(--color-tag-bg); text-decoration: none; }

/* ========================================
   Header & Navigation
   ======================================== */
header {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--color-border);
}
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}
.site-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-right: auto;
  text-decoration: none;
}
.site-title:hover { color: var(--color-link); text-decoration: none; }
.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a[aria-current] {
  color: var(--color-text);
  text-decoration: none;
}
.nav-links a[aria-current] { font-weight: 600; }
.rss-link {
  font-size: 0.82rem;
  color: var(--color-faint);
  text-decoration: none;
}
.rss-link:hover { color: var(--color-muted); }

/* ========================================
   Hero Section (Homepage)
   ======================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 65vh;
  min-height: 420px;
  max-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  border-radius: 0;
}
.hero picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.hero picture img,
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 0 !important;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 700px;
  animation: fadeInUp 0.9s ease-out both;
}
.hero-content h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 40px rgba(0,0,0,0.3);
}
.hero-content p {
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 0 30px rgba(0,0,0,0.3);
}
a.btn.btn-hero, a.btn.btn-hero:visited {
  font-size: 1.1rem;
  padding: 0.8em 2em;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
a.btn.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

/* ========================================
   Logo Bar (Social proof)
   ======================================== */
.logo-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 1.5rem 0;
  margin-bottom: 0.5rem;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding-left: 4rem;
  padding-right: 4rem;
  animation: fadeIn 1s ease-out 0.3s both;
}
.logo-bar a {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
}
.logo-bar img {
  height: 28px;
  width: auto;
  margin: 0 !important;
  border-radius: 0 !important;
  opacity: 0.55;
  filter: grayscale(100%);
  transition: opacity 0.2s, filter 0.2s;
  cursor: pointer;
}
/* Normalize visual weight — heavier logos get slightly lower opacity */
.logo-bar img[alt="Google"],
.logo-bar img[alt="Microsoft"] {
  opacity: 0.48;
}
.logo-bar img[alt="CoinDesk"] {
  opacity: 0.48;
}
.logo-bar img[alt="Protocol Labs"] {
  opacity: 0.50;
}
.logo-bar a:hover img,
.logo-bar img:hover {
  opacity: 0.85;
}
@media (prefers-color-scheme: dark) {
  .logo-bar img {
    filter: grayscale(100%) invert(1);
    opacity: 0.55;
  }
  .logo-bar img[alt="Google"],
  .logo-bar img[alt="Microsoft"] {
    opacity: 0.48;
  }
  .logo-bar img[alt="CoinDesk"] {
    opacity: 0.48;
  }
  .logo-bar img[alt="Protocol Labs"] {
    opacity: 0.50;
  }
  .logo-bar a:hover img,
  .logo-bar img:hover {
    opacity: 0.85;
  }
}

/* ========================================
   "As Featured In" Bar
   ======================================== */
.featured-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0 0.5rem;
}
.featured-in-label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-faint);
  white-space: nowrap;
}
.featured-in-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.featured-in-logos a {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
}
.featured-in-logos img {
  height: 32px;
  width: auto;
  margin: 0 !important;
  border-radius: 0 !important;
  opacity: 0.45;
  filter: grayscale(100%);
  transition: opacity 0.2s;
}
.featured-in-logos a:hover img {
  opacity: 0.85;
}
@media (prefers-color-scheme: dark) {
  .featured-in-logos img {
    filter: grayscale(100%) invert(1);
    opacity: 0.45;
  }
  .featured-in-logos a:hover img {
    opacity: 0.85;
  }
}

/* CTA subtext */
.cta-subtext {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-faint);
  margin-top: 0.5rem;
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.stat {
  text-align: center;
  padding: 1.4rem 0.75rem;
  background: var(--color-link);
  border-radius: 10px;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(88,28,135,0.3);
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  margin-top: 0.35rem;
  line-height: 1.35;
}

/* ========================================
   Topics Grid
   ======================================== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.topic-card {
  padding: 1.4rem;
  background: var(--color-link);
  border-radius: 10px;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(88,28,135,0.3);
}
.topic-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #fff;
}
.topic-card p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0;
  line-height: 1.55;
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}
.page-header h1 {
  margin-bottom: 0.6rem;
}
.page-header time {
  display: inline-block;
  color: var(--color-muted);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.page-header time::before {
  content: "\2014\2002";
  color: var(--color-faint);
}

/* Tags */
.tags {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
  padding: 0.25em 0.75em;
  border-radius: 100px;
}

/* ========================================
   Content
   ======================================== */
.content {
  margin-bottom: 3rem;
}
.content > hr:first-child {
  display: none;
}
.content > p:first-child,
.content > hr:first-child + p {
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--color-text);
}

/* ========================================
   Section Listings
   ======================================== */
.section-listing {
  margin-top: 2.5rem;
}
.section-listing h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1rem;
}
.post-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
}
.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.15s;
}
.post-list li:last-child { border-bottom: none; }
.post-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
img.source-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 3px;
  margin: 0 !important;
  display: block;
}
.post-list a {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
}
.post-list a:hover { color: var(--color-link); }
.post-meta {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-faint);
  margin-top: 0.2rem;
  padding-left: 1.85rem;
}
.post-source {
  color: var(--color-muted);
  font-weight: 500;
}
.post-list p {
  font-size: 0.92rem;
  color: var(--color-muted);
  margin-top: 0.4rem;
  margin-bottom: 0;
  line-height: 1.6;
  padding-left: 1.85rem;
}

/* ========================================
   Footer
   ======================================== */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-muted);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-links, .footer-social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a, .footer-social a {
  color: var(--color-muted);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.85rem;
}
.footer-links a:hover, .footer-social a:hover { color: var(--color-text); }
.footer-social a {
  display: inline-flex;
  align-items: center;
}
img.social-icon {
  width: 18px;
  height: 18px;
  margin: 0 !important;
  border-radius: 0 !important;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity 0.2s;
}
img.social-icon:hover {
  opacity: 0.8;
}
@media (prefers-color-scheme: dark) {
  img.social-icon {
    filter: grayscale(100%) invert(1);
  }
}
footer p { margin-bottom: 0; font-family: var(--font-heading); }
.footer-copy { text-align: center; }
.footer-cta {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-muted) !important;
  text-decoration: none !important;
  border: 1px solid var(--color-border);
  padding: 0.35em 1em;
  border-radius: 100px;
  transition: color 0.15s, border-color 0.15s;
}
.footer-cta:hover {
  color: var(--color-text) !important;
  border-color: var(--color-text);
}

/* ========================================
   Tables
   ======================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}
th, td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border-light);
  text-align: left;
}
th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
}

/* Appearance CTA */
.appearance-cta {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-light);
}
.appearance-cta p {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

/* Footnotes */
.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Toptal badge — show light in light mode, dark in dark mode */
.toptal-badge-dark { display: none; }
.toptal-badge-light { display: block; }
@media (prefers-color-scheme: dark) {
  .toptal-badge-dark { display: block; }
  .toptal-badge-light { display: none; }
}

/* Bio mugshot */
.content img[alt="Erick Watson headshot"],
.content img[alt="Erick Watson 头像"] {
  max-width: 200px;
  border-radius: 50%;
  display: inline-block;
}

/* ========================================
   CJK / Chinese
   ======================================== */
.zh {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Source Han Sans SC", var(--font-body);
}
.zh .content { line-height: 1.95; }
.zh h1, .zh h2, .zh h3, .zh h4 {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  html { font-size: 17px; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.3rem; }
  header, footer, main { padding-left: 1.25rem; padding-right: 1.25rem; }
  nav { gap: 0.4rem 1.25rem; }
  .nav-links { gap: 1rem; }
  .page-header { margin-bottom: 2rem; }

  /* Hero responsive */
  .hero {
    height: 55vh;
    min-height: 340px;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1.05rem;
  }

  /* Stats: 2 columns on tablet/mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Topics: stack on mobile */
  .topics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  h1 { font-size: 1.65rem; }
  header { margin-bottom: 2rem; }
  .site-title { font-size: 1.15rem; }
  .nav-links { gap: 0.75rem; }

  .hero {
    height: 50vh;
    min-height: 300px;
  }
  .hero-content h1 {
    font-size: 1.7rem;
  }
  .hero-content p {
    font-size: 0.95rem;
  }
  .logo-bar {
    gap: 0.6rem 1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    justify-content: center;
  }
  .logo-bar img {
    height: 22px;
  }
}

/* ========================================
   Sticky CTA
   ======================================== */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.sticky-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--color-link);
  padding: 0.7em 1.4em;
  border-radius: 100px;
  text-decoration: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background 0.15s;
}
.sticky-cta.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: slideInUp 0.4s ease-out;
}
.sticky-cta:hover {
  background: var(--color-link-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
@media (prefers-color-scheme: dark) {
  .sticky-cta { background: var(--color-link); }
  .sticky-cta:hover { background: var(--color-link-hover); }
}
@media (max-width: 480px) {
  .sticky-cta {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.82rem;
    padding: 0.6em 1.1em;
  }
}

/* ========================================
   Toptal Badge (extracted from inline styles)
   ======================================== */
.text-center { text-align: center; }
.toptal-badge-wrapper { display: flex; flex-direction: column; align-items: center; margin: 2rem 0; gap: 0.5rem; }
.toptal-case-study { margin: 0; font-size: 0.85rem; font-family: var(--font-heading); }
:root { --h: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); }
.toptal-badge .h { display: inline-block; background: #25a9ef; padding: 6px; clip-path: var(--h); }
.toptal-badge .a { width: 200px; padding: 24px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; clip-path: var(--h); }
.toptal-badge .b { margin: 0; font-size: 19px; font-weight: 700; line-height: 1; }
.toptal-badge .c { width: 120px; height: 1px; background: #25a9ef; }
.toptal-badge .d { font-size: 16px; margin-bottom: -6px; }
.toptal-badge .f { display: inline-flex; align-items: center; justify-content: center; padding: 4px 20px; border-radius: 6px; background: #296bff; color: #fff; font-size: 16px; font-weight: 500; text-decoration-thickness: .5px; text-underline-offset: 2px; }
#r, #r2 { font-family: system-ui, -apple-system, Arial, sans-serif; }

/* Light badge */
.toptal-badge-light .a { color: #204ecf; background: radial-gradient(circle at 20% -10%, #00c3ff -80%, #fff 30%), radial-gradient(circle at -20% 20%, #00c3ff -80%, #fff 30%), radial-gradient(circle at 70% 100%, #00c3ff -80%, #fff 30%), radial-gradient(circle at 120% 80%, #00c3ff -80%, #fff 30%); background-blend-mode: multiply; box-shadow: 0 28px 50px rgba(6,30,96,.35); }

/* Dark badge */
#r2 .a { color: #fff; background: linear-gradient(153deg, #0667ff 18%, #204ecf 40%, #0f256e 80%); box-shadow: 0 28px 50px rgba(6,30,96,.35); }
#r2 .d { opacity: .8; }
