/* Radiologist blogs page styling */
.blogs-page {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: clamp(1rem, 4vw, 3rem);
}

.blogs-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.blogs-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--mint);
  margin-bottom: 0.75rem;
}

.blogs-hero p {
  color: var(--muted);
  margin: 0;
}

/* Quick links nav for blog posts - Sticky with scroll animation */
.blog-quick-links {
  position: relative;
  z-index: 100;
  max-width: 1200px;
  margin: 0 auto 0.5rem;
  padding: 0 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-quick-links.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 100%;
  background: transparent;
  padding: 0.5rem 1rem;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.quick-links-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Horizontal layout when sticky */
.blog-quick-links.is-sticky .quick-links-inner {
  flex-direction: row;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0.3rem;
}

.quick-link {
  display: inline-block;
  width: auto;
  text-align: center;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--mint);
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Shrunk state when sticky */
.blog-quick-links.is-sticky .quick-link {
  max-width: 180px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  background: var(--panel-2);
  border-color: color-mix(in oklab, var(--mint) 30%, var(--border));
}

.quick-link:hover,
.quick-link:focus {
  background: var(--mint);
  color: #051e14;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  border-color: var(--mint);
}

.blog-quick-links.is-sticky .quick-link:hover,
.blog-quick-links.is-sticky .quick-link:focus {
  background: var(--mint);
  color: #051e14;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  border-color: var(--mint);
}

/* Light mode adjustments */
html.light .blog-quick-links.is-sticky {
  background: color-mix(in oklab, var(--panel) 98%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

html.light .blog-quick-links.is-sticky .quick-link {
  background: var(--panel);
}

@media (max-width: 768px) {
  .blog-quick-links.is-sticky .quick-link {
    max-width: 120px;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
}

@media (max-width: 600px) {
  .quick-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
  }

  .blog-quick-links.is-sticky .quick-links-inner {
    flex-wrap: wrap;
  }

  .blog-quick-links.is-sticky .quick-link {
    max-width: 100px;
  }
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Fullscreen blog feed */
.fullscreen-blogs {
  display: block;
  width: 100%;
}

.blog-card.fullscreen {
  min-height: auto;
  margin: 2rem auto;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 1200px;
}

.blog-hero {
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.6));
  color: #fff;
  padding: clamp(2rem, 6vw, 4rem);
}

.hero-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  flex: 1 1 60%;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.5rem 0;
  color: var(--mint);
}

.hero-meta {
  display: flex;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.hero-summary {
  color: rgba(255, 255, 255, 0.9);
  max-width: 60ch;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  background: var(--mint);
  color: #051e14;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
}

.hero-author-panel {
  width: 260px;
  flex: 0 0 260px;
  background: rgba(255, 255, 255, 0.04);
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
}

.author-avatar-lg {
  width: 96px;
  height: 96px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel-2);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.author-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name-lg {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mint);
}

.author-quals-lg {
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.author-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--mint);
  text-decoration: underline;
}

.blog-content-wrap {
  padding: 2.25rem clamp(1rem, 4vw, 3rem);
  max-width: 1150px;
  margin: 0 auto 4rem;
  background: transparent;
  border-radius: 0;
  margin-top: 0;
  box-shadow: none;
}

.blog-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
}

.back-top {
  color: var(--mint);
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-author-panel {
    width: 100%;
    order: 2;
  }

  .hero-text {
    order: 1;
  }

  .blog-content-wrap {
    margin-top: 0.75rem;
    padding: 1.25rem;
  }
}

/* content headings inside article */
.blog-content h2,
.blog-content h3 {
  color: var(--mint);
  margin-top: 1.1rem;
  margin-bottom: 0.6rem;
  font-weight: 800;
}

.blog-content p {
  color: var(--text);
  line-height: 1.7;
  margin: 0 0 0.9rem 0;
}

.blog-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover,
.blog-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.blog-card header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.blog-card h2 {
  font-size: 1.35rem;
  margin: 0;
}

.blog-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.blog-summary {
  color: rgba(231, 237, 243, 0.88);
  line-height: 1.55;
  margin: 0;
}

.blog-card footer {
  margin-top: auto;
}

.blog-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: var(--mint);
  color: #051e14;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid color-mix(in oklab, var(--mint) 32%, var(--border));
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.blog-card a:hover,
.blog-card a:focus-visible {
  transform: translateY(-2px);
  background: color-mix(in oklab, var(--mint) 85%, #ffffff);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45);
}

.blog-submit {
  background: color-mix(in oklab, var(--mint) 12%, transparent);
  border: 1px dashed var(--mint);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: center;
  display: grid;
  gap: 1rem;
}

.blog-submit h2 {
  margin: 0;
}

.blog-submit p {
  margin: 0;
  color: var(--muted);
}

.blog-submit a {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--mint) 32%, var(--border));
  text-decoration: none;
  font-weight: 600;
  color: #051e14;
  background: var(--mint);
}

.blog-submit a:hover,
.blog-submit a:focus-visible {
  transform: translateY(-2px);
  background: color-mix(in oklab, var(--mint) 85%, #ffffff);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

/* Author Bio Section */
.author-bio {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.author-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel-2);
  border: 2px solid var(--border);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mint);
  background: color-mix(in oklab, var(--mint) 15%, var(--panel-2));
}

.author-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.author-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.author-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.author-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.author-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s ease;
  padding: 0;
}

.author-social a:hover,
.author-social a:focus-visible {
  background: var(--mint);
  color: #051e14;
  border-color: var(--mint);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.author-social svg {
  width: 18px;
  height: 18px;
}

/* Light mode overrides */
html.light .blogs-hero h1 {
  color: var(--mint);
}

html.light .blogs-hero p {
  color: var(--muted);
}

html.light .blog-card {
  background: var(--panel);
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html.light .blog-card:hover,
html.light .blog-card:focus-within {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

html.light .blog-summary {
  color: rgba(10, 30, 28, 0.88);
}

html.light .blog-card a {
  background: var(--mint);
  color: #051e14;
}

html.light .blog-card a:hover,
html.light .blog-card a:focus-visible {
  background: color-mix(in oklab, var(--mint) 90%, #000000);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

html.light .author-name {
  color: var(--text);
}

html.light .author-description,
html.light .blog-meta {
  color: var(--muted);
}

html.light .author-social a {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--muted);
}

html.light .author-social a:hover,
html.light .author-social a:focus-visible {
  background: var(--mint);
  color: #051e14;
}

/* Print / PDF friendly styles */
@media print {

  /* Simplify page for print */
  :root {
    color-scheme: light;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  header.navbar,
  .nav-links,
  .nav-auth,
  .blog-submit,
  .blogs-hero p,
  .page-wrapper>footer {
    display: none !important;
  }

  .blogs-hero {
    display: none !important;
  }

  .fullscreen-blogs,
  .blog-card.fullscreen,
  .blog-content-wrap,
  .blog-content {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .blog-card.fullscreen {
    page-break-inside: avoid;
    break-inside: avoid;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
  }

  .hero-title,
  .hero-meta,
  .author-name-lg {
    color: #000 !important;
  }

  .hero-actions,
  .author-link,
  a,
  .btn-primary,
  .btn-secondary,
  .back-top {
    display: none !important;
  }

  .blog-content h2,
  .blog-content h3 {
    color: #000 !important;
    font-weight: 800;
  }

  .blog-content p {
    color: #000 !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  /* Avoid awkward cuts inside paragraphs and images */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .author-avatar-lg,
  .hero-author-panel {
    display: block;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
  }
}