/*
  Monetized PaperMod skin
  - structural layout remains unchanged
  - only palette, radius, and CTA/edge treatment are adjusted
*/

:root {
  --theme: #f7f8fb;
  --entry: #ffffff;
  --primary: #132238;
  --secondary: #5f6b7a;
  --tertiary: #d9e0ea;
  --content: #223044;
  --code-bg: #f3f6fb;
  --code-block-bg: #eef3f9;
  --border: #d7deea;
  --accent: #2457d6;
  --accent-strong: #163ea7;
  --cta-bg: #132238;
  --cta-fg: #ffffff;
  --cta-muted: #6b7686;
  --radius-ui: 18px;
  --radius-card: 22px;
  --radius-button: 14px;
  --radius-image: 16px;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.06);
  --shadow-card: 0 1px 1px rgba(16, 24, 40, 0.04), 0 18px 40px rgba(16, 24, 40, 0.08);
}

body.dark {
  --theme: #0b1220;
  --entry: #121c2e;
  --primary: #eaf0f7;
  --secondary: #a7b3c3;
  --tertiary: #253246;
  --content: #d7e1ee;
  --code-bg: #152033;
  --code-block-bg: #10192a;
  --border: #26344a;
  --accent: #7ca6ff;
  --accent-strong: #acc4ff;
  --cta-bg: #f0f4fb;
  --cta-fg: #10192a;
  --cta-muted: #96a5b8;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  background: var(--theme);
  color: var(--content);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

main,
.header,
.footer,
.post-entry,
.first-entry,
.profile,
.post-single,
.toc,
.post-content table,
.terms-tags,
.pagination > * {
  border-radius: var(--radius-ui);
}

.post-entry,
.first-entry,
.profile,
.post-single,
.toc,
.post-content blockquote,
.post-content pre,
.post-content table,
.post-tags li a,
.pagination > * {
  background: var(--entry);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.post-entry,
.first-entry,
.profile,
.toc,
.post-content blockquote,
.post-content pre,
.post-content table,
.pagination > * {
  overflow: hidden;
}

.post-entry,
.first-entry,
.profile {
  border-radius: var(--radius-card);
}

.post-content :is(img, figure img, .entry-cover img, picture img) {
  border-radius: var(--radius-image);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.post-content img {
  max-width: 100%;
  height: auto;
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.1rem;
  color: var(--content);
}

.post-content table {
  border-collapse: separate;
  border-spacing: 0;
}

.post-content th,
.post-content td {
  border-color: var(--border);
}

.post-content code:not(pre code) {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.15rem 0.35rem;
}

.post-content pre {
  background: var(--code-block-bg);
  border-radius: 16px;
}

.post-tags li a,
.pagination > * a,
.button,
.cta__button {
  border-radius: var(--radius-button);
}

.post-tags li a,
.pagination > * a,
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: var(--entry);
  color: var(--primary);
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow-soft);
}

.post-tags li a:hover,
.pagination > * a:hover,
.button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* clean-up of non-essential page chrome */
.breadcrumbs,
.share-buttons,
.post-footer .post-nav-links,
.post-footer .post-nav,
.comments,
.comments-area,
#top-link {
  display: none !important;
}

/* CTA block for monetized links */
.cta {
  margin: 1.5rem 0;
}

.cta__button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  min-width: min(100%, 18rem);
  border: 1px solid transparent;
  background: var(--cta-bg);
  color: var(--cta-fg);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.cta__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.12);
  border-color: rgba(124, 166, 255, 0.35);
  color: var(--cta-fg);
}

.cta__label {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.cta__note {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--secondary);
}

.cta--secondary .cta__button {
  background: var(--entry);
  color: var(--primary);
  border-color: var(--border);
}

.cta--secondary .cta__button:hover {
  border-color: var(--accent);
}

/* keep article rhythm crisp without changing the layout grid */
.post-content hr,
.post-entry hr,
.first-entry hr {
  border-color: var(--border);
}

@media (max-width: 768px) {
  .cta__button {
    width: 100%;
  }
}
