/* Blizhe Blog — shared styles for static article pages
   Uses the same design tokens as the main app (Nocturne palette + typography). */

:root {
  --c-bg: 8 16 22;
  --c-bg-2: 16 34 52;
  --c-bg-green: 14 44 36;
  --c-surface: 24 36 52;
  --c-surface-2: 34 50 70;
  --c-border: 168 138 78;
  --c-text: 231 230 245;
  --c-muted: 156 154 186;
  --c-gold: 209 168 86;
  --c-gold-deep: 150 116 56;
  --c-lamp: 243 217 156;
  --c-ember: 230 168 122;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    'Golos Text',
    system-ui,
    -apple-system,
    sans-serif;
  color: rgb(var(--c-text));
  background-color: rgb(var(--c-bg));
  background-image:
    radial-gradient(120% 78% at 50% -16%, rgb(var(--c-surface-2) / 0.5), transparent 60%),
    radial-gradient(150% 120% at 50% 36%, transparent 46%, rgb(var(--c-bg) / 0.9) 100%),
    linear-gradient(165deg, rgb(var(--c-bg-2)) 0%, rgb(12 32 36) 44%, rgb(var(--c-bg-green)) 92%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
  min-height: 100vh;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: var(--grain);
}

::selection {
  background: rgb(var(--c-gold) / 0.3);
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: rgb(var(--c-lamp));
  text-wrap: balance;
  line-height: 1.25;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin-top: 0;
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  margin-top: 2.8rem;
}

h3 {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  margin-top: 2.2rem;
}

p {
  margin: 1.2rem 0;
  color: rgb(var(--c-text) / 0.92);
}

a {
  color: rgb(var(--c-gold));
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover {
  color: rgb(var(--c-lamp));
}

strong {
  color: rgb(var(--c-text));
  font-weight: 600;
}

em {
  font-family: 'Spectral', Georgia, serif;
  font-style: italic;
}

ul,
ol {
  margin: 1.2rem 0;
  padding-left: 1.5rem;
}

li {
  margin: 0.6rem 0;
  color: rgb(var(--c-text) / 0.92);
}

li::marker {
  color: rgb(var(--c-gold) / 0.6);
}

/* Layout */
.blog-container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

@media (min-width: 640px) {
  .blog-container {
    padding: 3rem 2rem 5rem;
  }
}

/* Header / meta */
.blog-header {
  margin-bottom: 2rem;
}

.blog-breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.blog-breadcrumb a {
  color: rgb(var(--c-muted));
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  color: rgb(var(--c-gold));
}

.blog-breadcrumb span {
  color: rgb(var(--c-muted) / 0.5);
  margin: 0 0.5rem;
}

.blog-meta {
  font-size: 0.9rem;
  color: rgb(var(--c-muted));
  margin-top: 1rem;
}

/* Hero image */
.blog-hero {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px -12px rgb(0 0 0 / 0.5);
}

/* Lead paragraph */
.blog-lead {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  color: rgb(var(--c-text) / 0.88);
  line-height: 1.75;
  margin: 1.5rem 0 2rem;
}

/* CTA Button */
.blog-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  margin: 1.5rem 0;
  border: none;
  border-radius: 9999px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #16120b;
  background: linear-gradient(120deg, #f6e6b6, #d8b65e, #a07a38);
  box-shadow: 0 0 24px -10px rgb(var(--c-lamp) / 0.5);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    filter 0.2s;
}

.blog-cta:hover {
  filter: brightness(1.05);
  color: #16120b;
}

.blog-cta:active {
  transform: scale(0.96);
  filter: brightness(0.95);
}

/* Practice questions block */
.practice-block {
  background: linear-gradient(180deg, rgb(var(--c-surface) / 0.78), rgb(var(--c-surface-2) / 0.6));
  border: 1px solid rgb(var(--c-border) / 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.practice-block h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.practice-block ol {
  margin: 0;
  padding-left: 1.5rem;
}

.practice-block li {
  margin: 0.7rem 0;
  font-size: 0.98rem;
}

/* Footer / cross-links */
.blog-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(var(--c-border) / 0.2);
}

.blog-footer h4 {
  font-size: 1rem;
  color: rgb(var(--c-muted));
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: 'Golos Text', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blog-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.blog-footer-link {
  display: block;
  padding: 1rem 1.2rem;
  background: rgb(var(--c-surface) / 0.5);
  border: 1px solid rgb(var(--c-border) / 0.15);
  border-radius: 0.75rem;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.blog-footer-link:hover {
  background: rgb(var(--c-surface) / 0.7);
  border-color: rgb(var(--c-gold) / 0.3);
}

.blog-footer-link-title {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgb(var(--c-lamp));
  margin-bottom: 0.25rem;
}

.blog-footer-link-desc {
  font-size: 0.9rem;
  color: rgb(var(--c-muted));
}

.blog-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: rgb(var(--c-gold));
  text-decoration: none;
}

.blog-home-link:hover {
  color: rgb(var(--c-lamp));
}

/* Blog index page */
.blog-index-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-index-header h1 {
  margin-bottom: 0.5rem;
}

.blog-index-header p {
  color: rgb(var(--c-muted));
  max-width: 28rem;
  margin: 0 auto;
}

.blog-card {
  display: block;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, rgb(var(--c-surface) / 0.78), rgb(var(--c-surface-2) / 0.6));
  border: 1px solid rgb(var(--c-border) / 0.2);
  border-radius: 1rem;
  text-decoration: none;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--c-gold) / 0.35);
  box-shadow: 0 8px 32px -12px rgb(0 0 0 / 0.4);
}

.blog-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: rgb(var(--c-lamp));
}

.blog-card p {
  margin: 0;
  font-size: 0.95rem;
  color: rgb(var(--c-muted));
  line-height: 1.6;
}

/* Wordmark in header */
.blog-wordmark {
  font-family: 'Spectral', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.012em;
  color: rgb(var(--c-lamp));
  text-shadow: 0 0 22px rgb(var(--c-lamp) / 0.28);
  text-decoration: none;
  font-size: 1.3rem;
}

.blog-wordmark:hover {
  color: rgb(var(--c-lamp));
}

/* Top navigation */
.blog-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.blog-nav-cta {
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
