/* ========== BLOG STYLES ========== */

/* ========== SHARED LAYOUT ========== */
main {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ========== TOP NAVIGATION ========== */
nav.blog-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

nav.blog-nav a.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--color-accent-bg);
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

nav.blog-nav a.back-btn:hover {
  background-color: var(--color-accent);
  color: var(--color-card-bg);
}

nav.blog-nav a.back-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

nav.blog-nav span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
}

nav.blog-nav span a {
  color: var(--color-text);
  text-decoration: none;
}

nav.blog-nav span a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* ========== BLOG POST HERO ========== */
.blog-hero {
  position: relative;
  margin-bottom: 2rem;
  text-align: center;
}

.blog-hero-bg {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background-color: var(--color-accent-bg);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.7;
}

.blog-icon {
  font-size: 4rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  display: block;
}

.blog-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.blog-meta time {
  font-weight: 600;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.blog-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1.5px solid var(--color-card-border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
}

/* ========== BLOG POST BODY ========== */
.blog-body {
  margin-bottom: 2.5rem;
}

.blog-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Drop Cap */
.blog-body > p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3.2em;
  float: left;
  color: var(--color-accent);
  margin-right: 0.1em;
  margin-top: 0.05em;
  line-height: 1;
}

.blog-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-body strong {
  color: var(--color-text);
  font-weight: 600;
}

.blog-body ul,
.blog-body ol {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-body li {
  margin-bottom: 0.5rem;
}

/* ========== BLOG IMAGES ========== */
.blog-body figure {
  margin: 2rem 0;
  text-align: center;
}

.blog-body figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--color-card-border);
}

.blog-body figcaption {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Presentation photos - smaller, not full-width */
.blog-body figure.blog-photo {
  margin: 2rem auto;
  max-width: 80%;
}

.blog-body figure.blog-photo img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ========== DETAILS / SUMMARY ========== */
.blog-body details {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background-color: var(--color-accent-bg);
  border-radius: 8px;
  border: 1px solid var(--color-card-border);
}

.blog-body details summary {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.25rem 0;
}

.blog-body details[open] summary {
  margin-bottom: 0.75rem;
}

.blog-body details ul {
  margin-bottom: 0.5rem;
}

.blog-body details li {
  font-size: 0.88rem;
}

/* ========== REFERENCES ========== */
.blog-body ul.references {
  list-style-type: none;
  padding-left: 0;
  margin-left: 0;
  font-size: 0.85rem;
  --pico-typography-spacing-vertical: 0;
}

.blog-body ul.references li {
  list-style-type: none;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  padding-left: 0;
}

/* ========== CALLOUTS ========== */
.blog-body .callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background-color: var(--color-accent-bg);
  border-radius: 8px;
  border: 1px solid var(--color-card-border);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-text);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.blog-body .callout i {
  color: var(--color-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.blog-body .callout p {
  margin-bottom: 0;
  color: var(--color-text);
  font-size: 0.92rem;
}

/* ========== RENAME TIMELINE ========== */
.rename-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  align-items: center;
}

.rename-timeline .rename-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
}

.rename-timeline .rename-pill .rename-year {
  font-weight: 400;
  opacity: 0.75;
}

.rename-timeline .rename-arrow {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  opacity: 0.5;
}

.rename-pill-1 { background: #fde8e8; color: #991b1b; }
.rename-pill-2 { background: #fef3c7; color: #92400e; }
.rename-pill-3 { background: #d1fae5; color: #065f46; }
.rename-pill-4 { background: #dbeafe; color: #1e40af; }
.rename-pill-5 { background: #ede9fe; color: #5b21b6; }
.rename-pill-6 { background: #fce7f3; color: #9d174d; }

[data-theme="dark"] .rename-pill-1 { background: #5a1a1a; color: #fca5a5; }
[data-theme="dark"] .rename-pill-2 { background: #5a3e0a; color: #fcd34d; }
[data-theme="dark"] .rename-pill-3 { background: #0a4a3a; color: #6ee7b7; }
[data-theme="dark"] .rename-pill-4 { background: #1a2e5a; color: #93c5fd; }
[data-theme="dark"] .rename-pill-5 { background: #2e1a5a; color: #c4b5fd; }
[data-theme="dark"] .rename-pill-6 { background: #5a1a3a; color: #f9a8d4; }

@media (max-width: 600px) {
  .rename-timeline {
    gap: 0.35rem;
  }
  .rename-timeline .rename-pill {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }
  .rename-timeline .rename-arrow {
    font-size: 0.65rem;
  }
}

/* ========== AUTHOR BIO ========== */
.author-bio {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-accent-bg);
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ========== DARK MODE TOGGLE (blog override) ========== */
.theme-toggle {
  bottom: 2rem;
  right: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--color-accent);
  color: var(--color-card-bg);
  border: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--color-accent-soft);
}

/* ========== BLOG LISTING PAGE ========== */
.blog-listing-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.blog-listing-intro h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.blog-listing-intro p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  --pico-typography-spacing-vertical: 0;
}

.blog-list li {
  list-style: none;
  padding-left: 0;
}

.blog-list-item {
  margin-bottom: 2rem;
}

.blog-list-item a {
  display: block;
  padding: 1.5rem;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.blog-list-item a:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  text-decoration: none;
}

.blog-list-item .post-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.blog-list-item .post-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.blog-list-item .post-description {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.blog-list-item .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-list-item .post-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border: 1.5px solid var(--color-card-border);
  border-radius: 999px;
  color: var(--color-text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  main {
    padding: 1.5rem 1rem;
  }

  .blog-title {
    font-size: 1.8rem;
  }

  .blog-hero-bg {
    width: 150px;
    height: 150px;
  }

  .blog-icon {
    font-size: 3rem;
  }

  .blog-listing-intro h1 {
    font-size: 1.8rem;
  }

  .theme-toggle {
    bottom: 1rem;
    right: 1rem;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1rem;
  }
}
