/* Blog Post page-specific CSS */

:root {
    --bg: #ffffff; --bg-soft: #f7f7f5; --bg-darker: #050510;
    --ink: #0a0a14; --ink-2: #2a2a35; --muted: #6b6b78;
    --line: #e8e8e3;
    --brand: #5b3df5; --brand-2: #8b6dff; --brand-soft: #efeaff;
    --radius-md: 12px; --radius-lg: 18px;
    --shadow-md: 0 12px 24px -10px rgba(20,20,40,0.10);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink); background: var(--bg);
    font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  }
  a { color: inherit; text-decoration: none; }
  img { max-width: 100%; }
  .wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
  .wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
  .serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; }
  .nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; }
  .logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
  .logo-img { height: 56px; display: block; }
  .logo-img.invert { filter: invert(1) brightness(2); }
  .nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--ink-2); font-weight: 500; }
  .nav-links a:hover { color: var(--brand); }
  .nav-cta { display: flex; gap: 10px; align-items: center; }
  .btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
    font-size: 14px; font-weight: 600; line-height: 1; border: 1px solid transparent; transition: all 0.15s ease;
    cursor: pointer; white-space: nowrap; }
  .btn-ghost { background: transparent; color: var(--ink-2); }
  .btn-ghost:hover { background: var(--bg-soft); }
  .btn-primary { background: var(--brand); color: #fff; }
  .btn-primary:hover { background: #4a30d4; }
  .post-header { padding: 64px 0 40px; background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%); border-bottom: 1px solid var(--line); }
  .post-header .breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
  .post-header .breadcrumb a { color: var(--brand); font-weight: 600; }
  .post-header h1 { font-size: clamp(32px, 4.5vw, 50px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 22px; }
  .post-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
  .post-tags-row .tag { font-size: 10px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase; }
  .post-meta-row { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
  .post-meta-row .avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #2c1798); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
  .post-meta-row .author { font-weight: 700; color: var(--ink); }
  .hero-img { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-lg); margin: 32px auto -32px; box-shadow: var(--shadow-md); max-width: 1000px; background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%); }
  .hero-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
  .post-body { padding: 80px 0; }
  .post-body h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.015em; margin: 48px 0 16px; line-height: 1.55; }
  .post-body h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 36px 0 12px; line-height: 1.55; }
  /* h4–h6 so editor headings keep the Inter system instead of UA Times fallback */
  .post-body h4 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 28px 0 10px; line-height: 1.4; }
  .post-body h5 { font-size: 16px; font-weight: 700; letter-spacing: -0.005em; margin: 24px 0 8px; line-height: 1.4; }
  .post-body h6 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 24px 0 8px; line-height: 1.4; }
  .post-body p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0 0 22px; }
  .post-body ul, .post-body ol { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0 0 22px; padding-left: 24px; }
  .post-body li { margin-bottom: 10px; }
  .post-body strong { color: var(--ink); font-weight: 700; }
  .post-body a { color: var(--brand); text-decoration: underline; text-decoration-color: rgba(91,61,245,0.30); }
  .post-body a:hover { text-decoration-color: var(--brand); }
  .post-body blockquote { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 18px 24px; border-radius: 8px; margin: 28px 0; font-style: italic; font-size: 17px; line-height: 1.65; }
  .post-cta { background: var(--bg-darker); color: #fff; border-radius: var(--radius-lg); padding: 40px; margin: 48px 0; text-align: center; }
  .post-cta h3 { font-size: 24px; font-weight: 800; margin: 0 0 12px; color: #fff; line-height: 1.55; letter-spacing: normal; }
  .post-cta h3 em { color: var(--brand-2); font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; }
  .post-cta p { color: rgba(255,255,255,0.7); margin: 0 0 22px; }
  .post-cta .btn-primary { background: var(--brand); color: #fff; padding: 14px 28px; font-size: 15px; }
  .related { background: var(--bg-soft); padding: 72px 0; border-top: 1px solid var(--line); }
  .related h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 32px; text-align: center; line-height: 1.55; }
  .related h2 em { color: var(--brand); font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; }
  .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .related-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.2s ease, border-color 0.2s ease; }
  .related-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-2); }
  .related-card img { width: 100%; aspect-ratio: 16/10; object-fit: contain; padding: 8px; background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%); }
  .related-card .body { padding: 18px; }
  .related-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; letter-spacing: normal; }
  .related-card h3 a:hover { color: var(--brand); }
  .related-card .meta { font-size: 12px; color: var(--muted); }
  footer { background: var(--bg-darker); color: rgba(255,255,255,0.60); padding: 64px 0 28px; }
  .footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 48px; }
  .footer-cta-card { color: rgba(255,255,255,0.80); }
  .footer-cta-card .lede { font-size: 14px; line-height: 1.5; margin: 14px 0 18px; color: rgba(255,255,255,0.65); }
  footer .footer-heading { font-size: 11px; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 16px; line-height: 1.55; }
  footer ul { list-style: none; padding: 0; margin: 0; }
  footer ul li { margin-bottom: 10px; }
  footer ul li a { color: rgba(255,255,255,0.60); font-size: 14px; transition: color 0.15s ease; }
  footer ul li a:hover { color: #fff; }
  .footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.45); }
  @media (max-width: 800px) {
    .related-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
  }

  /* Author card */
  .author-card-blog { display: flex; gap: 22px; align-items: flex-start;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 32px; margin: 56px 0 24px; }
  .author-card-blog .ac-avatar { width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #2c1798); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 26px; flex-shrink: 0; }
  .author-card-blog .ac-body { flex: 1; }
  .author-card-blog .ac-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--brand); text-transform: uppercase; margin-bottom: 4px; }
  .author-card-blog .ac-name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 2px; }
  .author-card-blog .ac-title { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
  .author-card-blog .ac-bio { font-size: 14px; line-height: 1.65; color: var(--ink-2); margin: 0 0 12px; }
  .author-card-blog .ac-bio a { color: var(--brand); font-weight: 600; }
  .author-card-blog .ac-meta { font-size: 13px; }
  .author-card-blog .ac-meta a { color: var(--brand); font-weight: 700; }
  @media (max-width: 600px) { .author-card-blog { flex-direction: column; } }


  /* Nav dropdown — Resources */
  .nav-links .has-submenu { position: relative; }
  .nav-links .submenu-trigger {
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer;
  }
  .nav-links .submenu-trigger .caret {
    font-size: 10px; transition: transform 0.15s ease;
    margin-top: 1px; color: var(--muted);
  }
  .nav-links .has-submenu:hover .submenu-trigger .caret,
  .nav-links .has-submenu:focus-within .submenu-trigger .caret {
    transform: rotate(180deg); color: var(--brand);
  }
  .nav-links .submenu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 16px 40px -12px rgba(20,20,40,0.18);
    padding: 8px;
    min-width: 240px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 100;
  }
  .nav-links .submenu::before {
    content: ''; position: absolute; top: -4px; left: 0; right: 0; height: 12px;
  }
  .nav-links .has-submenu:hover .submenu,
  .nav-links .has-submenu:focus-within .submenu {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateX(-50%) translateY(4px);
  }
  .nav-links .submenu a {
    display: block; padding: 10px 14px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--ink-2);
    transition: all 0.12s ease;
  }
  .nav-links .submenu a:hover { background: var(--brand-soft); color: var(--brand); }
